chiark / gitweb /
cgi-fcgi-interp: new garbage collection approach, wip implementation
[chiark-utils.git] / backup / nosnap
index b9d57ab21edf166d342c6c83c5e90ed97d061f97..06187fac0bbfaf88ce821ee16369ba3fa535fac5 100755 (executable)
@@ -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"
 }