diff options
author | Rex Dieter <rdieter@math.unl.edu> | 2015-09-16 10:07:55 -0500 |
---|---|---|
committer | Rex Dieter <rdieter@math.unl.edu> | 2015-09-16 10:07:55 -0500 |
commit | b45d91da777d0809f8b9f87e99c858558b13b0e1 (patch) | |
tree | fde32eacd2a16e6cd59d4ba49048bb39e11ef33c | |
parent | f9484adbcac35ec1754931601cb46aa8967852d0 (diff) |
xdg-open shell script contains bash code (BR86028)
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | scripts/xdg-open.in | 6 |
2 files changed, 6 insertions, 1 deletions
@@ -4,6 +4,7 @@ * xdg-screensaver support for xautolock (BR89655) * xdg-icon-resource: does not support filenames with spaces (BR91758) * xdg-open: Add support for multi-word $BROWSER commands (BR91989) + * xdg-open shell script contains bash code (BR86028) 2015-07-15 Rex Dieter <rdieter@fedoraproject.org> * better for other (non-gnome) GVfs-based desktops, from Yaakov Selkowitz <yselkowi@redhat.com> diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in index f0d1f0b..2175f85 100644 --- a/scripts/xdg-open.in +++ b/scripts/xdg-open.in @@ -281,7 +281,11 @@ open_generic() # Decode URLs if echo "$file" | grep -q '^file:///'; then file=${file#file://} - file="$(printf "$(echo "$file" | sed -e 's@%\([a-f0-9A-F]\{2\}\)@\\x\1@g')")" + local printf=printf + if [ -x /usr/bin/printf ]; then + printf=/usr/bin/printf + fi + file="$($printf "$(echo "$file" | sed -e 's@%\([a-f0-9A-F]\{2\}\)@\\x\1@g')")" fi file_check=${file%%#*} file_check=${file_check%%\?*} |