[Box Backup-commit] COMMIT r2661 - in box/RELEASE/0.11rc7: bin/bbackupquery lib/common

subversion at boxbackup.org subversion at boxbackup.org
Mon Mar 8 21:35:19 GMT 2010


Author: chris
Date: 2010-03-08 21:35:19 +0000 (Mon, 08 Mar 2010)
New Revision: 2661

Modified:
   box/RELEASE/0.11rc7/bin/bbackupquery/BackupQueries.cpp
   box/RELEASE/0.11rc7/lib/common/Box.h
Log:
Merge [2601] [2602] [2603] from trunk into 0.11rc7. Don't try to stat 
excluded directories during compare, reported by Ben Bennett.


Modified: box/RELEASE/0.11rc7/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/RELEASE/0.11rc7/bin/bbackupquery/BackupQueries.cpp	2010-03-08 21:32:40 UTC (rev 2660)
+++ box/RELEASE/0.11rc7/bin/bbackupquery/BackupQueries.cpp	2010-03-08 21:35:19 UTC (rev 2661)
@@ -1544,13 +1544,29 @@
 				continue;
 			}
 
+			std::string localDirPath(MakeFullPath(rLocalDir,
+				localDirEn->d_name));
+			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
-			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?

Modified: box/RELEASE/0.11rc7/lib/common/Box.h
===================================================================
--- box/RELEASE/0.11rc7/lib/common/Box.h	2010-03-08 21:32:40 UTC (rev 2660)
+++ box/RELEASE/0.11rc7/lib/common/Box.h	2010-03-08 21:35:19 UTC (rev 2661)
@@ -119,8 +119,8 @@
 		{ \
 			OPTIONAL_DO_BACKTRACE \
 			BOX_WARNING("Exception thrown: " \
-				#type "(" #subtype ") (" message ") at " \
-				__FILE__ "(" << __LINE__ << ")") \
+				#type "(" #subtype ") (" << message << \
+				") at " __FILE__ "(" << __LINE__ << ")") \
 		} \
 		throw type(type::subtype, message); \
 	}




More information about the Boxbackup-commit mailing list