Parcourir la source

more verbose and check unlock

Sniperovitch il y a 8 ans
Parent
commit
d08ec1fc43
1 fichiers modifiés avec 7 ajouts et 1 suppressions
  1. 7 1
      cocktail

+ 7 - 1
cocktail

@@ -226,8 +226,14 @@ unlock_project() {
   then
   then
     verbose "$FUNCNAME lock=$LOCK_FILE exists, delete"
     verbose "$FUNCNAME lock=$LOCK_FILE exists, delete"
     rm -f "$LOCK_FILE"
     rm -f "$LOCK_FILE"
+    if test ! -e "$LOCK_FILE";
+    then
+      verbose "$FUNCNAME $PROJET unlocked, $LOCK_FILE removed."
+    else
+      # we can'nt call die inside a function called by die
+      verbose "$FUNCNAME we can not unlock $PROJET, $LOCK_FILE still on disk."
+    fi
   fi
   fi
-  verbose "$FUNCNAME $PROJET unlocked"
 }
 }
 
 
 cleanup_working_folder() {
 cleanup_working_folder() {