diff options
author | Chris Wilson <chris+github@qwirx.com> | 2014-12-26 23:16:46 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2014-12-26 23:16:46 +0000 |
commit | 0b067dfcbc3bfc4fa1415e5e1e2a69cf1a693653 (patch) | |
tree | f5abd94f4826ceb9c1a847c2fa68fe1dc4c59084 /lib/backupstore/BackupStoreCheck.cpp | |
parent | 0c7bcfc15e2198181b947826e1561c1ea994b74c (diff) |
Fix test failures caused by using plain stat() instead of emu_stat().
On Windows, plain stat() no longer handles slashes in filenames correctly
(since upgrading MinGW? Or switching to 64-bit Windows?). We need to use
POSIX fstat() for now in RaidFile, but we can still use the emu_stat,
and in fact we should, to fix path translation.
Diffstat (limited to 'lib/backupstore/BackupStoreCheck.cpp')
-rw-r--r-- | lib/backupstore/BackupStoreCheck.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/backupstore/BackupStoreCheck.cpp b/lib/backupstore/BackupStoreCheck.cpp index 81a99b05..bef23f3f 100644 --- a/lib/backupstore/BackupStoreCheck.cpp +++ b/lib/backupstore/BackupStoreCheck.cpp @@ -335,9 +335,10 @@ int64_t BackupStoreCheck::CheckObjectsScanDir(int64_t StartID, int Level, const { // build name std::string dn(rdiscSet[l] + DIRECTORY_SEPARATOR + rDirName); - struct stat st; + EMU_STRUCT_STAT st; - if(stat(dn.c_str(), &st) != 0 && errno == ENOENT) + if(EMU_STAT(dn.c_str(), &st) != 0 && + errno == ENOENT) { if(mkdir(dn.c_str(), 0755) != 0) { |