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.patch of Package xdg-utils.6021
From ea7e2924df069a66423459c00e4e512063720fb1 Mon Sep 17 00:00:00 2001 From: Jiri Slaby <jslaby@suse.cz> Date: Thu, 27 Nov 2014 16:31:52 +0100 Subject: [PATCH 1/1] xdg-mime: generic, do not return more than one default References: bnc#906625 Now, 'xdg-mime query default' can return more than one application: $ XDG_UTILS_DEBUG_LEVEL=5 xdg-mime query default text/plain Checking /home/xslaby/.local/share//applications/mimeapps.list Checking /usr/share/applications/defaults.list and /usr/share/applications/mimeinfo.cache writer.desktop kde4-active-documentviewer_txt.desktop It is due to an unlimited grep in defapp_generic(). So limit the output by 'head -1'. Signed-off-by: Jiri Slaby <jslaby@suse.cz> --- scripts/xdg-mime.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: xdg-utils-20150119/scripts/xdg-mime.in =================================================================== --- xdg-utils-20150119.orig/scripts/xdg-mime.in +++ xdg-utils-20150119/scripts/xdg-mime.in @@ -383,7 +383,7 @@ 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 | 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 | cut -d ';' -f 1` if [ -n "$trader_result" ] ; then echo $trader_result exit_success
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