summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2006-08-31 22:24:00 +0000
committerChris Wilson <chris+github@qwirx.com>2006-08-31 22:24:00 +0000
commitee5edcd9303a50a8381dc5493171609e8f3c3d51 (patch)
tree1fbfca95b075646a85b79bcc87a1d639d313ca14 /lib
parent8c087ccbf91e7e5c475c447519bd45a5ec69911e (diff)
Use DIRECTORY_SEPARATOR instead of assuming that it's a forward slash
(refs #3)
Diffstat (limited to 'lib')
-rw-r--r--lib/backupstore/BackupStoreCheck.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/backupstore/BackupStoreCheck.cpp b/lib/backupstore/BackupStoreCheck.cpp
index eca1df2f..16eeecf9 100644
--- a/lib/backupstore/BackupStoreCheck.cpp
+++ b/lib/backupstore/BackupStoreCheck.cpp
@@ -328,7 +328,8 @@ 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] == '/');
+ 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 @@ void BackupStoreCheck::CheckObjectsDir(int64_t StartID)
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)
{