tUse rmdir instead of rm -r (refs #7) - tomb - the crypto undertaker (HTM) git clone git://parazyd.org/tomb.git (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit 938cb01af0194ea3d3e66a2632fffcb92f2523cd (DIR) parent 1eb5157b9a1fc89ff88074a700417eb61c70a5da (HTM) Author: boyska <piuttosto@logorroici.org> Date: Thu, 4 Aug 2011 11:43:18 +0200 Use rmdir instead of rm -r (refs #7) rm -r is too dangerous. use 'rmdir' instead: it aborts if dir is not empty. As suggested by jamiromimil: https://github.com/dyne/Tomb/issues/7#issuecomment-1724892 Diffstat: M src/tomb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- (DIR) diff --git a/src/tomb b/src/tomb t@@ -965,7 +965,7 @@ umount_tomb() { if [ $tombmount ]; then # tomb is actively mounted func "performing umount of $tombmount" umount ${tombmount} 2> /dev/null - rm -r ${tombmount} + rmdir ${tombmount} if ! [ $? = 0 ]; then error "Tomb is busy, cannot umount!" fi