[Box Backup-commit] COMMIT r983 - box/trunk/lib/backupstore
boxbackup-dev at fluffy.co.uk
boxbackup-dev at fluffy.co.uk
Thu Oct 12 21:52:52 BST 2006
Author: chris
Date: 2006-10-12 21:52:52 +0100 (Thu, 12 Oct 2006)
New Revision: 983
Modified:
box/trunk/lib/backupstore/BackupStoreCheck.cpp
Log:
* Use DIRECTORY_SEPARATOR instead of assuming that it's a forward slash
Modified: box/trunk/lib/backupstore/BackupStoreCheck.cpp
===================================================================
--- box/trunk/lib/backupstore/BackupStoreCheck.cpp 2006-10-12 20:52:16 UTC (rev 982)
+++ box/trunk/lib/backupstore/BackupStoreCheck.cpp 2006-10-12 20:52:52 UTC (rev 983)
@@ -328,7 +328,8 @@
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] == '/');
+ ASSERT(dirName.size() > 4 &&
+ dirName[dirName.size() - 4] == DIRECTORY_SEPARATOR_ASCHAR);
// Remove the filename from it
dirName.resize(dirName.size() - 4); // four chars for "/o00"
@@ -377,7 +378,9 @@
if(!fileOK)
{
// Unexpected or bad file, delete it
- ::printf("Spurious file %s/%s found%s\n", dirName.c_str(), (*i).c_str(), mFixErrors?", deleting":"");
+ ::printf("Spurious file %s" DIRECTORY_SEPARATOR "%s "
+ "found%s\n", dirName.c_str(), (*i).c_str(),
+ mFixErrors?", deleting":"");
++mNumberErrorsFound;
if(mFixErrors)
{
More information about the Boxbackup-commit
mailing list