From af310e1e3f03557d52c4ea69d2e5730de213a9b7 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 4 May 2015 18:56:34 +0000 Subject: Fix tests failing because they can't delete the lock file. Deleting the account deletes the lockfile, so unlocking fails. --- lib/backupstore/BackupStoreAccounts.cpp | 6 +++--- 1 file 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; -- cgit v1.2.3