[Box Backup-commit] COMMIT r3152 - box/trunk/bin/bbstoreaccounts

subversion at boxbackup.org subversion at boxbackup.org
Sat Nov 17 16:54:56 GMT 2012


Author: chris
Date: 2012-11-17 16:54:55 +0000 (Sat, 17 Nov 2012)
New Revision: 3152

Modified:
   box/trunk/bin/bbstoreaccounts/bbstoreaccounts.cpp
Log:
Fix account deletion on Windows by removing write lock before deleting
files.


Modified: box/trunk/bin/bbstoreaccounts/bbstoreaccounts.cpp
===================================================================
--- box/trunk/bin/bbstoreaccounts/bbstoreaccounts.cpp	2012-11-17 00:54:04 UTC (rev 3151)
+++ box/trunk/bin/bbstoreaccounts/bbstoreaccounts.cpp	2012-11-17 16:54:55 UTC (rev 3152)
@@ -358,7 +358,7 @@
 			return 1;
 		}
 		
-		// Back to original user, but write is maintained
+		// Back to original user, but write lock is maintained
 		user.reset();
 	}
 
@@ -403,6 +403,11 @@
 		}
 	}
 
+#ifdef WIN32
+	// Cannot remove files while holding a lock on them
+	writeLock.ReleaseLock();
+#endif
+
 	int retcode = 0;
 
 	// Thirdly, delete the directories...




More information about the Boxbackup-commit mailing list