From 12993b6498f96179a4950489fbe630ddb20dccc2 Mon Sep 17 00:00:00 2001 From: Javier Tejero Date: Mon, 9 Dec 2013 11:49:25 +0100 Subject: [PATCH 1/2] Bugfix: Missing quotes at xdg-open --- vendor/xdg-open | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/xdg-open b/vendor/xdg-open index 13caac1..d28025f 100755 --- a/vendor/xdg-open +++ b/vendor/xdg-open @@ -656,7 +656,7 @@ open_generic() fi if [ x"$browser_with_arg" = x"$browser" ]; then - eval '$browser $1'$xdg_redirect_output; + eval '$browser "$1"'$xdg_redirect_output; else eval '$browser_with_arg'$xdg_redirect_output; fi From 286911b33fe296b883d606a6369ff21757c17972 Mon Sep 17 00:00:00 2001 From: Javier Tejero Date: Tue, 10 Dec 2013 13:15:39 +0100 Subject: [PATCH 2/2] Bugfix: Now opens files that contain quotes as well. All tests are passing correctly. --- vendor/xdg-open | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vendor/xdg-open b/vendor/xdg-open index d28025f..cb72fc8 100755 --- a/vendor/xdg-open +++ b/vendor/xdg-open @@ -555,15 +555,15 @@ search_desktop_file() command_exec=`which $command 2>/dev/null` arguments="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | last_word`" arg_one="`echo $arg | sed 's/&/\\\\&/g'`" - arguments_exec="`echo $arguments | sed -e 's*%[fFuU]*"'"$arg_one"'"*g'`" + arguments_exec="`echo $arguments | sed -e 's*%[fFuU]*'"$arg_one"'*g'`" 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