Bug 86028

Summary: xdg-open shell script contains bash code
Product: Portland Reporter: Yuri <yuri>
Component: xdg-utilsAssignee: Portland Bugs <portland-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: pelle
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: xdg-open-printf.diff

Description Yuri 2014-11-08 09:45:40 UTC
xdg-open (interpreted by /bin/sh) contains this line:
file="$(printf "$(echo "$file" | sed -e 's@%\([a-f0-9A-F]\{2\}\)@\\x\1@g')")"

This syntax is for bash, and not for the regular shell.
It fails on FreeBSD, where sh!=bash (unlike on linux)

This line should be fixed to work with the regular shell.

xdg-utils-1.0.2.20130919
Comment 1 Per Olofsson 2015-09-13 07:59:11 UTC
Created attachment 118232 [details] [review]
xdg-open-printf.diff

Here's a patch from Debian that fixes the bug.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.