xdg-utils/0012-xdg-open-fails-to-open-web-browser-urls-with-a-query.patch
2014-09-20 09:12:26 -05:00

43 lines
1.2 KiB
Diff

From 5913207e625a92b73cd9489aea4b7b10bf3eb855 Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter@math.unl.edu>
Date: Sat, 26 Apr 2014 17:20:35 -0500
Subject: [PATCH 12/22] xdg-open fails to open web browser urls with a query
string (BR45857)
---
ChangeLog | 3 +++
scripts/xdg-open.in | 4 +++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index b7fcf86..f29d9d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
=== xdg-utils 1.1.x ===
+2014-04-26 Rex Dieter <rdieter@fedoraproject.org>
+ * xdg-open fails to open web browser urls with a query string (BR45857)
+
2014-02-07 Rex Dieter <rdieter@fedoraproject.org>
* Improvement of detecting KDE session (BR63157)
diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in
index 35f4b76..917df2c 100644
--- a/scripts/xdg-open.in
+++ b/scripts/xdg-open.in
@@ -254,7 +254,9 @@ open_generic()
file=${file#file://}
file="$(printf "$(echo "$file" | sed -e 's@%\([a-f0-9A-F]\{2\}\)@\\x\1@g')")"
fi
- check_input_file "$file"
+ file_check=${file%%#*}
+ file_check=${file_check%%\?*}
+ check_input_file "$file_check"
open_generic_xdg_file_mime "$file"
--
2.1.0