summaryrefslogtreecommitdiff
path: root/lib/backupstore
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2015-05-04 18:56:34 +0000
committerChris Wilson <chris+github@qwirx.com>2015-05-04 18:56:34 +0000
commitaf310e1e3f03557d52c4ea69d2e5730de213a9b7 (patch)
treea2b83b96c36acaa1f515d861fbe60d4faa2b4f36 /lib/backupstore
parentd39fdbcd444ee62ca6118b9bdf8314bc206fbb08 (diff)
Fix tests failing because they can't delete the lock file.
Deleting the account deletes the lockfile, so unlocking fails.
Diffstat (limited to 'lib/backupstore')
-rw-r--r--lib/backupstore/BackupStoreAccounts.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/backupstore/BackupStoreAccounts.cpp b/lib/backupstore/BackupStoreAccounts.cpp
index 7bfa029d..5f51917b 100644
--- a/lib/backupstore/BackupStoreAccounts.cpp
+++ b/lib/backupstore/BackupStoreAccounts.cpp
@@ -519,10 +519,10 @@ int BackupStoreAccountsControl::DeleteAccount(int32_t ID, bool AskForConfirmatio
}
}
-#ifdef WIN32
- // Cannot remove files while holding a lock on them
+ // NamedLock will throw an exception if it can't delete the lockfile,
+ // which it can't if it doesn't exist. Now that we've deleted the account,
+ // nobody can open it anyway, so it's safe to unlock.
writeLock.ReleaseLock();
-#endif
int retcode = 0;