Bug 100006 - Logic lacking in xdg-mime:info_gnome()
Summary: Logic lacking in xdg-mime:info_gnome()
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Portland Bugs
QA Contact:
Depends on:
Reported: 2017-02-28 13:30 UTC by Stian Sletner
Modified: 2019-02-16 13:38 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description Stian Sletner 2017-02-28 13:30:23 UTC
The logic in info_gnome() checks if gio, gvfs-info or gnomevfs-info are available, but if neither of them are, it exits silently with exit code 0 (success).

This causes unexpected behaviour (ie "nothing happens") on a bare XFCE desktop, where none of these things are installed.

It's possible that the author expected $? to be nonzero in this case, but that's not how it works, observe:

$ ls missing
ls: cannot access 'missing': No such file or directory
$ echo $?
$ if ls missing; then echo ok; fi
ls: cannot access 'missing': No such file or directory
$ echo $?

So it seems to me there lacks an else clause here that errs.  At a glance this logic seems to be repeated in the other info_*() functions but I couldn't tell you if those too can trigger in reality.
Comment 1 Rex Dieter 2017-02-28 14:50:33 UTC
modern glib2 includes gio, so having any gtk-based DE without it, seems... unlikely?
Comment 2 GitLab Migration User 2019-02-16 13:38:34 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/xdg-utils/issues/105.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.