summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2012-11-17 16:54:55 +0000
committerChris Wilson <chris+github@qwirx.com>2012-11-17 16:54:55 +0000
commitb86be0d98fd078f656719c4ed3cffdbeca198ef3 (patch)
tree59c3c4eaa60ab036fbc3521893ebd646fd030ee2 /bin
parentea2f013734a6ff260c935181e4d194ee6bba8e9a (diff)
Fix account deletion on Windows by removing write lock before deleting
files.
Diffstat (limited to 'bin')
-rw-r--r--bin/bbstoreaccounts/bbstoreaccounts.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/bbstoreaccounts/bbstoreaccounts.cpp b/bin/bbstoreaccounts/bbstoreaccounts.cpp
index 829f1a01..3f911b92 100644
--- a/bin/bbstoreaccounts/bbstoreaccounts.cpp
+++ b/bin/bbstoreaccounts/bbstoreaccounts.cpp
@@ -358,7 +358,7 @@ int DeleteAccount(Configuration &rConfig, int32_t ID, bool AskForConfirmation)
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 @@ int DeleteAccount(Configuration &rConfig, int32_t ID, bool AskForConfirmation)
}
}
+#ifdef WIN32
+ // Cannot remove files while holding a lock on them
+ writeLock.ReleaseLock();
+#endif
+
int retcode = 0;
// Thirdly, delete the directories...