From f853266dd5243f440b3d998e10a17be1267f8668 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 6 Jul 2023 19:08:05 +0100 Subject: hstow: escape two forward slashes --- bin/hstow | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/hstow') diff --git a/bin/hstow b/bin/hstow index ff7d4eb4..ed2a98f5 100755 --- a/bin/hstow +++ b/bin/hstow @@ -223,7 +223,7 @@ stow1 () { sub(/[^\/]*$/, "", dotdotslashes) gsub(/[^\/]+/, "..", dotdotslashes) $2 = $1 - $3 = $1; sub(/\/[^/]+$/, "", $3) + $3 = $1; sub(/\/[^\/]+$/, "", $3) $1 = ENVIRON["HOME"] "/" rel $4 = '"$adoptp"' ? "true" : "false" $5 = dotdotslashes ".STOW/'"$NAME"'/" rel @@ -273,7 +273,7 @@ unstow () { { gsub(/"/, "\"'"'"'\"'"'"'\"", $1) printf "\"%s\"\n", $1 | "xargs -E '' -- rm -f" sub(/^.\//, "", $1) - sub(/\/?[^/]+$/, "", $1) + sub(/\/?[^\/]+$/, "", $1) if ($1) dirs[++i] = $1 } END { close("xargs -E '' -- rm -f") for (d in dirs) printf "\"%s\"\n", dirs[d] -- cgit v1.2.3