summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2006-08-31 22:22:35 +0000
committerChris Wilson <chris+github@qwirx.com>2006-08-31 22:22:35 +0000
commit8c087ccbf91e7e5c475c447519bd45a5ec69911e (patch)
tree52681da3e86f83bb6a513537a26c152b5f4c6f45 /lib
parent98cae61cf5d5ffc29ccdca2c75a415702dd13936 (diff)
Revert to trunk
Diffstat (limited to 'lib')
-rw-r--r--lib/backupstore/BackupStoreCheck.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/backupstore/BackupStoreCheck.cpp b/lib/backupstore/BackupStoreCheck.cpp
index 16d397a2..eca1df2f 100644
--- a/lib/backupstore/BackupStoreCheck.cpp
+++ b/lib/backupstore/BackupStoreCheck.cpp
@@ -328,8 +328,7 @@ void BackupStoreCheck::CheckObjectsDir(int64_t StartID)
std::string dirName;
StoreStructure::MakeObjectFilename(StartID, mStoreRoot, mDiscSetNumber, dirName, false /* don't make sure the dir exists */);
// Check expectations
- ASSERT(dirName.size() > 4 &&
- dirName[dirName.size() - 4] == DIRECTORY_SEPARATOR_ASCHAR);
+ ASSERT(dirName.size() > 4 && dirName[dirName.size() - 4] == '/');
// Remove the filename from it
dirName.resize(dirName.size() - 4); // four chars for "/o00"
@@ -378,9 +377,7 @@ void BackupStoreCheck::CheckObjectsDir(int64_t StartID)
if(!fileOK)
{
// Unexpected or bad file, delete it
- ::printf("Spurious file %s" DIRECTORY_SEPARATOR "%s "
- "found%s\n", dirName.c_str(), (*i).c_str(),
- mFixErrors?", deleting":"");
+ ::printf("Spurious file %s/%s found%s\n", dirName.c_str(), (*i).c_str(), mFixErrors?", deleting":"");
++mNumberErrorsFound;
if(mFixErrors)
{
@@ -469,11 +466,10 @@ bool BackupStoreCheck::CheckAndAddObject(int64_t ObjectID, const std::string &rF
}
// Add to usage counts
- int64_t s = file->GetDiscUsageInBlocks();
- mBlocksUsed += s;
+ mBlocksUsed += size;
if(!isFile)
{
- mBlocksInDirectories += s;
+ mBlocksInDirectories += size;
}
}
catch(...)