Bug 492967

Summary: Strange error message when trying to launch a broken symlink
Product: [Applications] dolphin Reporter: Jin Liu <ad.liu.jin>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: dolphin-bugs-null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=503584
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Jin Liu 2024-09-11 04:03:28 UTC
STEPS TO REPRODUCE
1. `ln -s /nonexist.jpg .`
2. In Dolphin, double click on the broken symlink.

OBSERVED RESULT

An info bar saying "WorkingDirectory= expects an absolute path or '~'" appears.

EXPECTED RESULT

Say "the link target is not found".

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 6.1.80
KDE Frameworks Version: 6.7.0
Qt Version: 6.7.2
Dolphin Version: master

ADDITIONAL INFORMATION
Comment 1 Justin Zobel 2024-09-11 09:48:02 UTC
Can confirm this on git master.
Comment 2 Bug Janitor Service 2024-10-11 07:55:33 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1734
Comment 3 Jin Liu 2024-12-12 10:17:37 UTC
Git commit 237d83dd0171146718d3cbeb5c1f60ed27ff3b9f by Jin Liu.
Committed on 11/12/2024 at 03:26.
Pushed by meven into branch 'master'.

ApplicationLauncherJob: don't launch with a single non-existent argument

If there is only one url argument, it's a local path, and it's a broken
symlink (or non-existent in general), don't launch the application and fail
immediately.

M  +1    -3    autotests/CMakeLists.txt
M  +43   -0    autotests/applicationlauncherjobtest.cpp
M  +2    -0    autotests/applicationlauncherjobtest.h
M  +11   -0    src/gui/applicationlauncherjob.cpp

https://invent.kde.org/frameworks/kio/-/commit/237d83dd0171146718d3cbeb5c1f60ed27ff3b9f