about summary refs log tree commit diff stats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/archive_compress.sh10
-rwxr-xr-xmodules/by-name/lf/lf/commands/scripts/archive_decompress.sh2
2 files changed, 2 insertions, 10 deletions
diff --git a/modules/by-name/lf/lf/commands/scripts/archive_compress.sh b/modules/by-name/lf/lf/commands/scripts/archive_compress.sh
index 0d53af2a..c3776a80 100755
--- a/modules/by-name/lf/lf/commands/scripts/archive_compress.sh
+++ b/modules/by-name/lf/lf/commands/scripts/archive_compress.sh
@@ -1,11 +1,5 @@
 # shellcheck shell=sh
 
-# Option '-f' disables pathname expansion which can be useful when $f, $fs, and
-# $fx variables contain names with '*' or '?' characters. However, this option
-# is used selectively within individual commands as it can be limiting at
-# times.
-set -f
-
 # shellcheck disable=SC2269
 f="$f"
 # shellcheck disable=SC2269
@@ -49,7 +43,7 @@ done
 
 # fx contains all selected file name separated by a newline
 while read -r file; do
-    set -- "$@" "$file"
+    set -- "$@" "$(realpath --relative-to="$(pwd)" "$file")"
 done <"$(echo "$fx" | tmp)"
 
 case "$archiver" in
@@ -63,7 +57,7 @@ case "$archiver" in
     7z a "$name" "$@"
     ;;
 "zip")
-    zip --symlinks -9 -r "$name" "$@"
+    zip --symlinks -9 --recurse-paths "$name" "$@"
     ;;
 esac
 # vim: ft=sh
diff --git a/modules/by-name/lf/lf/commands/scripts/archive_decompress.sh b/modules/by-name/lf/lf/commands/scripts/archive_decompress.sh
index 142ac4d2..08374176 100755
--- a/modules/by-name/lf/lf/commands/scripts/archive_decompress.sh
+++ b/modules/by-name/lf/lf/commands/scripts/archive_decompress.sh
@@ -9,8 +9,6 @@ fs="$fs"
 # shellcheck disable=SC2269
 id="$id"
 
-set -f
-
 echo "$fx" | while read -r file; do
     case "$file" in
     *.tar.bz | *.tar.bz2 | *.tbz | *.tbz2) tar --extract --bzip2 --verbose --file="$file" ;;