From 350eeb7483ae32f1d08c7340501dbd3048ac0344 Mon Sep 17 00:00:00 2001 From: Anathema Date: Tue, 25 Oct 2011 19:37:28 +0200 Subject: [PATCH] fix #51: added a check into umount_tomb() before removing mount point: if it's the default one, then delete it --- src/tomb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tomb b/src/tomb index 126e043..35693c3 100755 --- a/src/tomb +++ b/src/tomb @@ -954,8 +954,11 @@ umount_tomb() { umount ${tombmount} if ! [ $? = 0 ]; then error "Tomb is busy, cannot umount!" - else - rmdir ${tombmount} + else + # this means we used a "default" mount point + if [ "${tombmount}" = "/media/${tombname}.tomb" ]; then + rmdir ${tombmount} + fi fi fi