[Portland-bugs] [Bug 100006] New: Logic lacking in xdg-mime:info_gnome()

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Feb 28 13:30:23 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=100006

            Bug ID: 100006
           Summary: Logic lacking in xdg-mime:info_gnome()
           Product: Portland
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: xdg-utils
          Assignee: portland-bugs at lists.freedesktop.org
          Reporter: stian+bz at sletner.com

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 $?
2
$ if ls missing; then echo ok; fi
ls: cannot access 'missing': No such file or directory
$ echo $?
0

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/portland-bugs/attachments/20170228/5e8f5be7/attachment.html>


More information about the Portland-bugs mailing list