summaryrefslogtreecommitdiff
path: root/lib/backupstore
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2013-10-02 19:13:07 +0000
committerChris Wilson <chris+github@qwirx.com>2013-10-02 19:13:07 +0000
commit478bee5a3a7967522472287888ea8d672e8ecef9 (patch)
tree0925c6f89e4dd80d98e92317266b0f7763ff1f03 /lib/backupstore
parent74ae28b464f3bd691b7e24f6eb0ace619e290114 (diff)
Files are allowed to be both Old and Deleted.
Count them as Deleted, not as Old.
Diffstat (limited to 'lib/backupstore')
-rw-r--r--lib/backupstore/BackupStoreCheck.cpp18
1 files changed, 6 insertions, 12 deletions
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++;