[Portland-bugs] [Bug 89902] xdg-open does not exit if it does not recognize the mimetype

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Apr 6 06:37:36 PDT 2015


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

--- Comment #6 from Rex Dieter <rdieter at math.unl.edu> ---
OK, this should be a better fix (than comment #4):

diff -u /usr/bin/xdg-open.orig /usr/bin/xdg-open
--- /usr/bin/xdg-open.orig      2015-04-06 08:27:10.396932209 -0500
+++ /usr/bin/xdg-open   2015-04-06 08:29:31.534667495 -0500
@@ -706,7 +706,8 @@
         file_check=${file_check%%\?*}
         check_input_file "$file_check"

-        open_generic_xdg_file_mime "$file"
+        filetype=`xdg-mime query filetype "$file_check" | sed "s/;.*//"`
+        open_generic_xdg_mime "$file" "$filetype"

         if which run-mailcap 2>/dev/null 1>&2; then
             run-mailcap --action=view "$file"

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


More information about the Portland-bugs mailing list