summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/bbackupquery/BackupQueries.cpp30
1 files changed, 16 insertions, 14 deletions
diff --git a/bin/bbackupquery/BackupQueries.cpp b/bin/bbackupquery/BackupQueries.cpp
index d6b6bf91..15257fc3 100644
--- a/bin/bbackupquery/BackupQueries.cpp
+++ b/bin/bbackupquery/BackupQueries.cpp
@@ -1549,24 +1549,26 @@ void BackupQueries::Compare(int64_t DirID, const std::string &rStoreDir,
std::string storeDirPath(rStoreDir + "/" +
localDirEn->d_name);
- // Check whether dir is excluded before trying to
- // stat it, to fix problems with .gvfs directories
- // that are not readable by root causing compare
- // to crash:
- // http://lists.boxbackup.org/pipermail/boxbackup/2010-January/000013.html
- if(rParams.IsExcludedDir(localDirPath))
- {
- rParams.NotifyExcludedDir(localDirPath,
- storeDirPath);
- continue;
- }
-
#ifndef HAVE_VALID_DIRENT_D_TYPE
EMU_STRUCT_STAT st;
if(EMU_LSTAT(localDirPath.c_str(), &st) != 0)
{
- THROW_EXCEPTION_MESSAGE(CommonException,
- OSFileError, localDirPath);
+ // Check whether dir is excluded before trying
+ // to stat it, to fix problems with .gvfs
+ // directories that are not readable by root
+ // causing compare to crash:
+ // http://lists.boxbackup.org/pipermail/boxbackup/2010-January/000013.html
+ if(rParams.IsExcludedDir(localDirPath))
+ {
+ rParams.NotifyExcludedDir(localDirPath,
+ storeDirPath);
+ continue;
+ }
+ else
+ {
+ THROW_EXCEPTION_MESSAGE(CommonException,
+ OSFileError, localDirPath);
+ }
}
// Entry -- file or dir?