From 9def4381ffd64f7c3eddb77052048dcb167cd4c5 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 31 Jan 2010 22:55:01 +0000 Subject: Don't try to stat excluded directories, reported by Ben Bennett [http://lists.boxbackup.org/pipermail/boxbackup/2010-January/000013.html]. --- bin/bbackupquery/BackupQueries.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'bin/bbackupquery') diff --git a/bin/bbackupquery/BackupQueries.cpp b/bin/bbackupquery/BackupQueries.cpp index 687dcb05..1179e04e 100644 --- a/bin/bbackupquery/BackupQueries.cpp +++ b/bin/bbackupquery/BackupQueries.cpp @@ -1544,13 +1544,24 @@ void BackupQueries::Compare(int64_t DirID, const std::string &rStoreDir, continue; } + std::string localDirPath(MakeFullPath(rLocalDir, + localDirEn->d_name)); + std::string storeDirPath(rStoreDir + "/" + + localDirEn->d_name); + + if(rParams.IsExcludedDir(localDirPath)) + { + rParams.NotifyExcludedDir(localDirPath, + storeDirPath); + continue; + } + #ifndef HAVE_VALID_DIRENT_D_TYPE - std::string fn(MakeFullPath - (rLocalDir, localDirEn->d_name)); EMU_STRUCT_STAT st; - if(EMU_LSTAT(fn.c_str(), &st) != 0) + if(EMU_LSTAT(localDirPath.c_str(), &st) != 0) { - THROW_EXCEPTION(CommonException, OSFileError) + THROW_EXCEPTION_MESSAGE(CommonException, + OSFileError, localDirPath); } // Entry -- file or dir? -- cgit v1.2.3