X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=backup%2Fnosnap;h=06187fac0bbfaf88ce821ee16369ba3fa535fac5;hb=2a99e898ef2a1c13ad09cc38d7d3a9a2a6c1d7f1;hp=b9d57ab21edf166d342c6c83c5e90ed97d061f97;hpb=c6d1694c6a8c80e76d677fafb811bd977ab1da38;p=chiark-utils.git diff --git a/backup/nosnap b/backup/nosnap index b9d57ab..06187fa 100755 --- a/backup/nosnap +++ b/backup/nosnap @@ -3,10 +3,10 @@ set -e removes () { - if test -d "$vardir/snap-mount"; then - rmdir -- "$vardir/snap-mount" - else + if test -L "$vardir/snap-mount"; then rm -f -- "$vardir/snap-mount" + elif test -d "$vardir/snap-mount"; then + rmdir -- "$vardir/snap-mount" fi rm -f -- "$vardir/snap-device" }