Bug 288389 - kde-open breaks xdg-open with incorrect exit status.
Summary: kde-open breaks xdg-open with incorrect exit status.
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-07 09:41 UTC by Peter Brett
Modified: 2011-12-09 15:50 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Brett 2011-12-07 09:41:27 UTC
Version:           unspecified (using KDE 4.7.3) 
OS:                Linux

According to "man xdg-open", xdg-open is supposed to exit with non-zero exit
status on failure.  However, when using kde-open, it exits with status 0 all the time.  This is because kde-open does not provide feedback via its exit status on failure.

This breaks applications that rely on xdg-open to launch viewer applications appropriate to the current desktop environment.

This is a defect in kde-open which should be fixed.  xdg-open's behaviour cannot be restored without changes to kde-open.

Reproducible: Always

Steps to Reproduce:
1. From KDE, run Konsole.
2. Run: xdg-open /path/to/missing/file; echo "result = $?"
2. Run: kde-open /path/to/missing/file; echo "result = $?"

Actual Results:  
result = 0
result = 0

Expected Results:  
result = 2
result = <non-zero>

See also: https://bugzilla.redhat.com/show_bug.cgi?id=760748
Comment 1 David Faure 2011-12-08 21:16:39 UTC
Git commit e6e6fb53419ec212ccae083162999d66e7d5663b by David Faure.
Committed on 08/12/2011 at 23:18.
Pushed by dfaure into branch 'master'.

Fix kde-open exit code

FIXED-IN: 4.8
BUG: 288389

M  +4    -5    kioclient/kioclient.cpp

http://commits.kde.org/kde-runtime/e6e6fb53419ec212ccae083162999d66e7d5663b