aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xJsonMenu_Scripts/ls.json.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/JsonMenu_Scripts/ls.json.sh b/JsonMenu_Scripts/ls.json.sh
index 5b4680ed..626912cb 100755
--- a/JsonMenu_Scripts/ls.json.sh
+++ b/JsonMenu_Scripts/ls.json.sh
@@ -4,16 +4,16 @@ if [ "$1" == "" ] ; then
DIR=`pwd`
fi
-ls ${DIR} > /tmp/.tmp.lines.$$
+ls "${DIR}" > /tmp/.tmp.lines.$$
while read name
do
if [ -n "${OUT}" ] ; then
OUT="${OUT},"
fi
if [ -d "${DIR}/${name}" ] ; then
- OUT="${OUT} \"${name}\" : { \"type\" : \"jsonmenu\", \"exec\" : \"${0} ${DIR}/${name}\", \"icon\":\"folder\"}"
+ OUT="${OUT} \"${name}\" : { \"type\" : \"jsonmenu\", \"exec\" : \"${0} \\\"${DIR}/${name}\\\"\", \"icon\":\"folder\"}"
else
- OUT="${OUT} \"${name}\" : { \"type\" : \"item\", \"icon\":\"unknown\", \"action\" : \"xdg-open ${DIR}/${name}\"}"
+ OUT="${OUT} \"${name}\" : { \"type\" : \"item\", \"icon\":\"unknown\", \"action\" : \"xdg-open \\\"${DIR}/${name}\\\"\"}"
fi
done < /tmp/.tmp.lines.$$
rm /tmp/.tmp.lines.$$
bgstack15