瀏覽代碼

Protect spaces (issue 55)

Valentin Niess 3 年之前
父節點
當前提交
6dfa764573
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      python_appimage/data/python-wrapper.sh

+ 3 - 3
python_appimage/data/python-wrapper.sh

@@ -2,16 +2,16 @@
 
 # If running from an extracted image, then export ARGV0 and APPDIR
 if [ -z "${APPIMAGE}" ]; then
-    export ARGV0=$0
+    export ARGV0="$0"
 
-    self="$(readlink -f -- $0)"
+    self=$(readlink -f -- "$0") # Protect spaces (issue 55)
     here="${self%/*}"
     tmp="${here%/*}"
     export APPDIR="${tmp%/*}"
 fi
 
 # Resolve the calling command (preserving symbolic links).
-export APPIMAGE_COMMAND="$(command -v -- $ARGV0)"
+export APPIMAGE_COMMAND=$(command -v -- "$ARGV0")
 {{ tcltk-env }}
 {{ cert-file }}