From a68804713a6cb9eb96278df597fd0b4fefc36598 Mon Sep 17 00:00:00 2001 From: Mike Burns Date: Fri, 20 Nov 2015 14:21:02 +0100 Subject: rcdn(1) recurs until home dir, not root rcdn(1) will try to remove a file; if it is not a dotfile, it will keep going up until it found one. However, we should stop at `$DEST_DIR` (`$HOME`) -- nothing is relevant to us above there. Closes #169. --- bin/rcdn.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/rcdn.in b/bin/rcdn.in index ae7aad8..a2a8472 100755 --- a/bin/rcdn.in +++ b/bin/rcdn.in @@ -8,7 +8,9 @@ remove_link() { local original="$2" local sigil="$3" - if [ "x$dest" = "x/" ]; then + $DEBUG "remove_link $1 $2 $3" + + if [ "x$dest" = "x/" -o "x$dest" = "x$DEST_DIR" ]; then $VERBOSE "not a symlink, skipping: $original" elif [ -L "$dest" -o "x$sigil" = "xX" ]; then rm_v -rf "$dest" -- cgit v1.2.3