xdg-open problems with complex filenames
Submitted by Alexey
Assigned to Jonathan Blandford Blandford @jrb
Description
here is related bug https://bugs.gentoo.org/show_bug.cgi?id=447662
Steps to Reproduce:
1.rename file 'section.zip' to 'section (df ).zip'
2.xdg-open 'xdg-open 'section (df ).zip'
Actual Results:
xdg-open 'section (df ).zip'
START /usr/bin/7zFM section (df ).zip
/usr/bin/xdg-open: eval: line 568: syntax error near unexpected token (' /usr/bin/xdg-open: eval: line 568:
/usr/bin/7zFM section (df ).zip'
Expected Results:
just open file
diff --git a/xdg-open b/xdg-open index 0958fdc..55ba2ad 100755 --- a/xdg-open +++ b/xdg-open @@ -562,10 +562,10 @@ search_desktop_file() if [ -x "$command_exec" ] ; then if echo $arguments | grep -iq '%[fFuU]' ; then echo START $command_exec $arguments_exec
-
eval $command_exec $arguments_exec
-
eval "$command_exec '$arguments_exec'" else echo START $command_exec $arguments_exec "$arg"
-
eval $command_exec $arguments_exec "$arg"
-
eval "$command_exec '$arguments_exec' '$arg'" fi if [ $? -eq 0 ]; then
Here is the quick and dirty patch