Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.1:Update
xdg-utils.6021
xdg-mime-generic-do-not-return-more-than-one-de...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xdg-mime-generic-do-not-return-more-than-one-default-2.patch of Package xdg-utils.6021
Index: xdg-utils-20150119/scripts/xdg-mime.in =================================================================== --- xdg-utils-20150119.orig/scripts/xdg-mime.in +++ xdg-utils-20150119/scripts/xdg-mime.in @@ -374,8 +374,15 @@ defapp_generic() } ' $mimeapps_list` if [ -n "$trader_result" ] ; then - echo $trader_result - exit_success + # https://bugs.freedesktop.org/show_bug.cgi?id=44163 + # $trader_result could be a semicolon separated list take the first desktop file that has a binary that can be found (Implys the .desktop file exists) + for app in `echo "$trader_result" | sed 's/;/ /g'`; do + exists=$(desktop_file_to_binary "$app") + if [ "$exists" != "" ]; then + echo "$app" + exit_success + fi + done fi fi done @@ -383,10 +390,17 @@ defapp_generic() for x in `echo "$xdg_system_dirs" | sed 's/:/ /g'`; do for prefix in "$XDG_MENU_PREFIX" ""; do DEBUG 2 "Checking $x/applications/${prefix}defaults.list and $x/applications/${prefix}mimeinfo.cache" - trader_result=`grep "$MIME=" $x/applications/${prefix}defaults.list $x/applications/${prefix}mimeinfo.cache 2> /dev/null | head -1 | cut -d '=' -f 2 | cut -d ';' -f 1` + trader_result=`grep "$MIME=" $x/applications/${prefix}defaults.list $x/applications/${prefix}mimeinfo.cache 2> /dev/null | head -1 | cut -d '=' -f 2` if [ -n "$trader_result" ] ; then - echo $trader_result - exit_success + # https://bugs.freedesktop.org/show_bug.cgi?id=44163 + # $trader_result could be a semicolon separated list take the first desktop file that has a binary that can be found (Implys the .desktop file exists) + for app in `echo "$trader_result" | sed 's/;/ /g'`; do + exists=$(desktop_file_to_binary "$app") + if [ "$exists" != "" ]; then + echo "$app" + exit_success + fi + done fi done done
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor