From 6789eb88e24db8fea7eed877da7e68975b884ecf Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 11 Mar 2022 07:51:50 +0530 Subject: [PATCH] Fix replacement of symlinks to directories --- shell-integration/ssh/bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell-integration/ssh/bootstrap.sh b/shell-integration/ssh/bootstrap.sh index 546e17429..4e911a98e 100644 --- a/shell-integration/ssh/bootstrap.sh +++ b/shell-integration/ssh/bootstrap.sh @@ -188,7 +188,7 @@ mv_files_and_dirs() { cwd="$PWD" cd "$1" command find . -type d -exec mkdir -p "$2/{}" ";" - command find . -type l -exec sh -c "tgt=\$(command readlink -n \"{}\"); command ln -sf \"\$tgt\" \"$2/{}\"; command rm -f \"{}\"" ";" + command find . -type l -exec sh -c "tgt=\$(command readlink -n \"{}\"); command ln -snf \"\$tgt\" \"$2/{}\"; command rm -f \"{}\"" ";" command find . -type f -exec mv "{}" "$2/{}" ";" cd "$cwd" }