Bug 492967 - Strange error message when trying to launch a broken symlink
Summary: Strange error message when trying to launch a broken symlink
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-11 04:03 UTC by Jin Liu
Modified: 2025-05-01 05:22 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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