summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRex Dieter <rdieter@gmail.com>2018-05-02 10:09:43 -0500
committerRex Dieter <rdieter@gmail.com>2018-05-02 10:09:43 -0500
commita9bf6d0a3fc771f5c4c1c5a8941e5234dc4f82bf (patch)
treef7008eb99b2e38a36269c8ef290377b7c8ca2892
parent13963edddcad55438f03aefd4db1538cc8f68f14 (diff)
xdg-settings: check_browser is broken under kde when just the binary is specified (BR106343)
patch courtesy of Simon Lees (SUSE) <sflees@suse.de> BUG: 106343
-rw-r--r--ChangeLog3
-rw-r--r--scripts/xdg-settings.in27
2 files changed, 24 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 8060d47..f518c79 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
=== xdg-utils 1.1.3 ===
+2018-05-02
+ * xdg-settings: check_browser is broken under kde when just the binary is specified (BR106343)
+
2018-02-27
* xdg-open: Fixes LXQt behavior (BR81674,BR103146)
diff --git a/scripts/xdg-settings.in b/scripts/xdg-settings.in
index b65e659..3781de8 100644
--- a/scripts/xdg-settings.in
+++ b/scripts/xdg-settings.in
@@ -226,6 +226,14 @@ check_browser_kde()
fi
browser="`read_kde_browser`"
binary="`resolve_kde_browser`"
+
+ # The browser may contain a relative entry to the binary starting with !
+ if [ x"!" == x"${browser:0:1}" ]; then
+ # get the full path
+ browser="`binary_to_desktop_file ${browser:1}`"
+ binary="`desktop_file_to_binary $browser`"
+ fi
+
# Because KDE will use the handler for MIME type text/html if this value
# is empty, we allow either the empty string or a match to $check here.
if [ x"$binary" != x -a x"$binary" != x"$check" ]; then
@@ -575,16 +583,23 @@ check_url_scheme_handler_kde()
fi
if [ x"$1" = "mailto" ]; then
binary="`read_kde_config emaildefaults PROFILE_Default EmailClient`"
+ # The field may contain a relative entry to the binary starting with !
+ if [ x"!" == x"${binary:0:1}" ]; then
+ # get the full path
+ desktop_file="`binary_to_desktop_file ${binary:1}`"
+ binary="`desktop_file_to_binary $desktop_file`"
+ fi
+ if [ x"$binary" != x"$check" ]; then
+ echo no
+ exit_success
+ fi
+ else
+ handler="`get_browser_mime x-scheme-handler/$1`"
+ binary="`desktop_file_to_binary "$handler"`"
if [ x"$binary" != x"$check" ]; then
echo no
exit_success
fi
- fi
- handler="`get_browser_mime x-scheme-handler/$1`"
- binary="`desktop_file_to_binary "$handler"`"
- if [ x"$binary" != x"$check" ]; then
- echo no
- exit_success
fi
echo yes
exit_success