From 760ea38fed35ed12b431faa538f4ed6269a1c174 Mon Sep 17 00:00:00 2001 From: sigoden Date: Sat, 17 Aug 2024 12:40:32 +0800 Subject: refactor: improve `fs_*` (#99) improve `_guard_path` to use `realpath -m ` to get absolute path --- tools/fs_write.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/fs_write.sh') diff --git a/tools/fs_write.sh b/tools/fs_write.sh index 59ee812..b37a2d5 100755 --- a/tools/fs_write.sh +++ b/tools/fs_write.sh @@ -17,7 +17,7 @@ main() { } _guard_path() { - path="$(realpath "$1")" + path="$(realpath -m "$1")" action="$2" if [[ ! "$path" == "$(pwd)"* ]]; then if [ -t 1 ]; then -- cgit v1.2.3