[Box Backup-commit] COMMIT r2601 - box/trunk/bin/bbackupquery

subversion at boxbackup.org subversion at boxbackup.org
Sun Jan 31 22:55:03 GMT 2010


Author: chris
Date: 2010-01-31 22:55:01 +0000 (Sun, 31 Jan 2010)
New Revision: 2601

Modified:
   box/trunk/bin/bbackupquery/BackupQueries.cpp
Log:
Don't try to stat excluded directories, reported by Ben Bennett
[http://lists.boxbackup.org/pipermail/boxbackup/2010-January/000013.html].


Modified: box/trunk/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/trunk/bin/bbackupquery/BackupQueries.cpp	2010-01-31 21:33:27 UTC (rev 2600)
+++ box/trunk/bin/bbackupquery/BackupQueries.cpp	2010-01-31 22:55:01 UTC (rev 2601)
@@ -1544,13 +1544,24 @@
 				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?




More information about the Boxbackup-commit mailing list