Revision: 16031
http://sourceforge.net/p/skim-app/code/16031
Author: hofman
Date: 2026-02-04 17:30:46 +0000 (Wed, 04 Feb 2026)
Log Message:
-----------
escape double-quotes in file paths for AppleScript
Modified Paths:
--------------
trunk/displayline
Modified: trunk/displayline
===================================================================
--- trunk/displayline 2026-02-02 22:42:15 UTC (rev 16030)
+++ trunk/displayline 2026-02-04 17:30:46 UTC (rev 16031)
@@ -31,7 +31,7 @@
elif [[ "$1" == "-b" || "$1" == "-readingbar" ]]; then
reading_bar="with showing reading bar"
elif [[ "$1" == "-n" || "$1" == "-noselect" ]]; then
- no_select="without selecting"
+ no_selecting="without selecting"
elif [[ "$1" == "-g" || "$1" == "-background" ]]; then
activate=
elif [[ "$1" == "-z" || "$1" == "-zerobased" ]]; then
@@ -44,9 +44,11 @@
shopt -s extglob
[[ $# -gt 2 ]] && src="$3" || src=
-# expand relative paths
+# expand relative paths and escape double-quotes
[[ "${file:0:1}" == "/" ]] || file="${PWD}/${file}"
+[[ "${file}" != *'"'* ]] || file="${file//\"/\\\"}"
[[ -z "${src}" || "${src:0:1}" == "/" ]] || src="${PWD}/${src}"
+[[ -z "${src}" || "${src}" != *'"'* ]] || src="${src//\"/\\\"}"
[[ -z "${src}" ]] || from_source="from POSIX file \"${src}\""
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit