diff options
author | Chris Wilson <chris+github@qwirx.com> | 2014-12-26 23:16:42 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2014-12-26 23:16:42 +0000 |
commit | 0c7bcfc15e2198181b947826e1561c1ea994b74c (patch) | |
tree | b97326a4847dba1061589b9a05f0f4a8194545ec /lib | |
parent | eab3cd7bb2f08c7cec156cce5d1b5be881d5bbf1 (diff) |
Fix test failures caused by store path ending with slash on Windows.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/backupstore/BackupStoreCheck.cpp | 6 |
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)); } |