summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2015-05-16 09:17:18 +0000
committerChris Wilson <chris+github@qwirx.com>2015-05-16 09:17:18 +0000
commit950351f985fbad1d4c1af347c14b677864038466 (patch)
tree8b846d6d89b0dcb6fb5b28eb00e00bf606519d6a /lib
parentbb1b7df0f7e917a84d0caae32172af46a7ebda88 (diff)
Fix test failures on Windows caused by keeping files open too long.
Once again, the Windows issue of being unable to delete or overwrite an open file causes issues. In this case it's only test failures. We need to be diligent about closing open file handles and protocol sessions in tests.
Diffstat (limited to 'lib')
-rw-r--r--lib/backupstore/HousekeepStoreAccount.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/backupstore/HousekeepStoreAccount.cpp b/lib/backupstore/HousekeepStoreAccount.cpp
index 6fcc3a7f..e5bd3cbb 100644
--- a/lib/backupstore/HousekeepStoreAccount.cpp
+++ b/lib/backupstore/HousekeepStoreAccount.cpp
@@ -716,7 +716,7 @@ BackupStoreRefCountDatabase::refcount_t HousekeepStoreAccount::DeleteFile(
// Check this should be deleted
if(!wasDeleted && !wasOldVersion)
{
- // Things changed size we were last around
+ // Things changed since we were last around
return refs;
}
@@ -952,6 +952,8 @@ void HousekeepStoreAccount::UpdateDirectorySize(
std::auto_ptr<RaidFileRead> parentStream(
RaidFileRead::Open(mStoreDiscSet, parentFilename));
BackupStoreDirectory parent(*parentStream);
+ parentStream.reset();
+
BackupStoreDirectory::Entry* en =
parent.FindEntryByID(rDirectory.GetObjectID());
ASSERT(en);