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"
}