summaryrefslogtreecommitdiff
path: root/lib/backupstore/BackupStoreCheck.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-12-26 23:16:42 +0000
committerChris Wilson <chris+github@qwirx.com>2014-12-26 23:16:42 +0000
commit0c7bcfc15e2198181b947826e1561c1ea994b74c (patch)
treeb97326a4847dba1061589b9a05f0f4a8194545ec /lib/backupstore/BackupStoreCheck.cpp
parenteab3cd7bb2f08c7cec156cce5d1b5be881d5bbf1 (diff)
Fix test failures caused by store path ending with slash on Windows.
Diffstat (limited to 'lib/backupstore/BackupStoreCheck.cpp')
-rw-r--r--lib/backupstore/BackupStoreCheck.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/backupstore/BackupStoreCheck.cpp b/lib/backupstore/BackupStoreCheck.cpp
index 5f1b90d1..81a99b05 100644
--- a/lib/backupstore/BackupStoreCheck.cpp
+++ b/lib/backupstore/BackupStoreCheck.cpp
@@ -287,12 +287,14 @@ void BackupStoreCheck::CheckObjects()
{
// Make sure the starting root dir doesn't end with '/'.
std::string start(mStoreRoot);
- if(start.size() > 0 && start[start.size() - 1] == '/')
+ if(start.size() > 0 && (
+ start[start.size() - 1] == '/' ||
+ start[start.size() - 1] == DIRECTORY_SEPARATOR_ASCHAR))
{
start.resize(start.size() - 1);
}
- maxDir = CheckObjectsScanDir(0, 1, mStoreRoot);
+ maxDir = CheckObjectsScanDir(0, 1, start);
BOX_TRACE("Max dir starting ID is " <<
BOX_FORMAT_OBJECTID(maxDir));
}