From 478bee5a3a7967522472287888ea8d672e8ecef9 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 2 Oct 2013 19:13:07 +0000 Subject: Files are allowed to be both Old and Deleted. Count them as Deleted, not as Old. --- lib/backupstore/BackupStoreCheck.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'lib/backupstore') diff --git a/lib/backupstore/BackupStoreCheck.cpp b/lib/backupstore/BackupStoreCheck.cpp index f2302337..5e3e0b54 100644 --- a/lib/backupstore/BackupStoreCheck.cpp +++ b/lib/backupstore/BackupStoreCheck.cpp @@ -746,13 +746,13 @@ void BackupStoreCheck::CheckDirectories() BOX_FORMAT_OBJECTID(en->GetObjectID()) << " with flags " << en->GetFlags()); } - else // it's a good file, add to sizes - if(en->IsOld() && en->IsDeleted()) + // otherwise it's a good file, add to sizes + else if(en->IsDeleted()) // even if it's Old, + // it's still Deleted, don't count it twice. { - BOX_WARNING("File " << - BOX_FORMAT_OBJECTID(en->GetObjectID()) << - " is both old and deleted, " - "this should not happen!"); + mNumFiles++; + mNumDeletedFiles++; + mBlocksInDeletedFiles += en->GetSizeInBlocks(); } else if(en->IsOld()) { @@ -760,12 +760,6 @@ void BackupStoreCheck::CheckDirectories() mNumOldFiles++; mBlocksInOldFiles += en->GetSizeInBlocks(); } - else if(en->IsDeleted()) - { - mNumFiles++; - mNumDeletedFiles++; - mBlocksInDeletedFiles += en->GetSizeInBlocks(); - } else { mNumFiles++; -- cgit v1.2.3