forked from pool/xdg-utils
Jiri Slaby
0ce2a2ff18
- Update to 20160520 * xdg-mime: support for KDE Frameworks 5.6 * xdg-mime does not write the file it reads in a query (BR95051) * xdg-screensaver: Add cinnamon-screensaver D-Bus API support. * xdg-open: standardize output redirection style - Fix issues related to xdg-open/xdg-mime generic code paths. * xdg-common-desktop-bin-vendor-dir.patch * xdg-mime-return-existing-desktop-files.patch OBS-URL: https://build.opensuse.org/request/show/400599 OBS-URL: https://build.opensuse.org/package/show/X11:common:Factory/xdg-utils?expand=0&rev=53
37 lines
1.2 KiB
Diff
37 lines
1.2 KiB
Diff
commit 88deef3f4affa53680382540c2cd1ba9ce8e082d
|
|
Author: Simon Lees <sflees@suse.de>
|
|
Date: Fri Jun 3 16:45:08 2016 +0930
|
|
|
|
xdg-mime only return desktop file for existing apps
|
|
|
|
xdg-mime originally returned whatever was in the mimeapps.list
|
|
file, now it only returns the first desktop file that exists
|
|
and has a corrosponding binary that exists.
|
|
|
|
fdo#44163
|
|
|
|
Index: xdg-utils-20160520/scripts/xdg-mime.in
|
|
===================================================================
|
|
--- xdg-utils-20160520.orig/scripts/xdg-mime.in
|
|
+++ xdg-utils-20160520/scripts/xdg-mime.in
|
|
@@ -372,8 +372,17 @@ check_mimeapps_list()
|
|
}
|
|
' "$mimeapps_list" | cut -d ';' -f 1)
|
|
if [ -n "$result" ]; then
|
|
- echo "$result"
|
|
- exit_success
|
|
+ # $result could be a ; separated list of .desktop files
|
|
+ # use the first on the system
|
|
+ IFS=\;
|
|
+ for app in $result; do
|
|
+ IFS="$oldifs"
|
|
+ exists=$(desktop_file_to_binary "$app")
|
|
+ if [ -n "$exists" ]; then
|
|
+ echo "$app"
|
|
+ exit_success
|
|
+ fi
|
|
+ done
|
|
fi
|
|
fi
|
|
done
|