Skip to content
Snippets Groups Projects
  1. Aug 05, 2021
  2. Nov 13, 2020
  3. Feb 20, 2020
  4. Apr 13, 2019
    • Martin Puppe's avatar
      xdg-mime: return correct exit code for GNOME · 0547886c
      Martin Puppe authored
      If the desktop environment was GNOME and none of the commands for
      detecting the MIME type of a file was available, xdg-mime used to return
      exit code 0 even though it failed. The man page says it should return
      exit code 3. This commit fixes the issue.
      
      I have considered returning exit code 4 instead since that is what would
      be returned if info_kde() or info_generic() fail to find a tool for MIME
      type detection. But I have decided to implement the behavior as
      specified in the man page.
      
      The exit code of an if construct is 0 if no condition
      tested true [^1]. The author of the original code probably was not aware
      of this.
      
      [^1]: https://www.gnu.org/software/bash/manual/html_node/Conditional-Constructs.html#Conditional-Constructs
      0547886c
  5. Apr 01, 2019
  6. Mar 27, 2019
  7. Mar 26, 2019
  8. Mar 19, 2019
  9. Jan 12, 2019
    • Richard Tollerton's avatar
      test-lib.sh: run: eat xdg-open's exit code · af7b34a6
      Richard Tollerton authored
      It was observed that t-xdg-open.sh exits after only a fraction of the tests have
      been run, e.g.
      
      ASSERTION FAILED: expected command to be run: gio open http://www.freedesktop.org/
      ASSERTION FAILED: expected command to be run: gio open http://www.freedesktop.org/
        - opens a URL with gvfs-open if gio open is missing in GNOME 3, GNOME 2, and Cinnamon
      gio: http://www.freedesktop.org/
      
      : Operation not supported
      make: *** [Makefile:21: t-xdg-open.sh] Error 4
      
      Given that some tests are failing on my machine (likely because of the
      peculiarities of my archlinux install), the root cause is `set -e`. The nonzero
      exit code returned by xdg-open gets returned by run(), which is also returned by
      e.g. test_open_url(), which causes the script to exit immediately.
      
      All test passes/failures at present are being defined by explicit assertions,
      not by exit codes, and it seems at least plausible that some xdg-open calls are
      meant to fail. So rather than report the nonzero error code, just ignore it, and
      trust that the assertions determine the results.
      
      Signed-off-by: default avatarRichard Tollerton <rich.tollerton@ni.com>
      af7b34a6
  10. Jan 10, 2019
  11. Sep 13, 2018
  12. Sep 11, 2018
  13. May 24, 2018
  14. May 13, 2018
  15. May 10, 2018
  16. May 09, 2018
  17. May 02, 2018
  18. Feb 27, 2018
    • Rex Dieter's avatar
      Changelog for prior commit · 13963edd
      Rex Dieter authored
      13963edd
    • Luís Pereira's avatar
      xdg-open: Fixes LXQt behavior · 7d4360c6
      Luís Pereira authored and Rex Dieter's avatar Rex Dieter committed
      Commit 6387086e introduced LXQt support.
      In xdg-open it assumed that LXQt and LXDE are the same. They aren't. LXQt
      does not have pcmanfm, it has pcmanfm-qt.
      LXQt doesn't want to rely on pcmamfm-qt to handle it: LXQt is very modular
      and can be deployed without pcmanfm-qt.
      
      open_generic() works for LXQt but it depends on mimeopen and mimetype. In
      the future we will want, for sure, to drop those dependencies. That's the
      reason for the existence of open_lxqt().
      7d4360c6
  19. Dec 18, 2017
  20. Nov 29, 2017
  21. May 08, 2017
  22. Feb 28, 2017
Loading