[Box Backup-commit] COMMIT r3478 - box/trunk/bin/bbackupd

subversion at boxbackup.org subversion at boxbackup.org
Wed Dec 24 13:02:21 GMT 2014


Author: chris
Date: 2014-12-24 13:02:21 +0000 (Wed, 24 Dec 2014)
New Revision: 3478

Modified:
   box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp
Log:
Fix compile error on Windows caused by refactoring out SyncDirectoryEntry.

Thanks to Kai Liebenau for spotting it and submitting patches. I don't see
any need to actually collect link_st (using lstat) any more, because if the
location root is a symlink then we should just backup everything inside its
destination without question, and if it's not, comparing stat(parent) and
stat(child) will detect the difference, so no need to use lstat(parent)
instead.

Modified: box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp
===================================================================
--- box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp	2014-12-22 23:09:31 UTC (rev 3477)
+++ box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp	2014-12-24 13:02:21 UTC (rev 3478)
@@ -238,21 +238,6 @@
 	std::vector<std::string> files;
 	bool downloadDirectoryRecordBecauseOfFutureFiles = false;
 
-	EMU_STRUCT_STAT link_st;
-	if(EMU_LSTAT(rLocalPath.c_str(), &link_st) != 0)
-	{
-		// Report the error (logs and eventual email to administrator)
-		rNotifier.NotifyFileStatFailed(this,
-			ConvertVssPathToRealPath(rLocalPath, rBackupLocation),
-			strerror(errno));
-
-		// TODO FIXME move to NotifyFileStatFailed()
-		SetErrorWhenReadingFilesystemObject(rParams, rLocalPath);
-
-		// This shouldn't happen, so we'd better not continue
-		THROW_EXCEPTION(CommonException, OSFileError)
-	}
-
 	// BLOCK
 	{
 		// read the contents...
@@ -612,7 +597,7 @@
 		return false;
 	}
 
-	if(file_st.st_dev != link_st.st_dev)
+	if(file_st.st_dev != dir_st.st_dev)
 	{
 		rNotifier.NotifyMountPointSkipped(this,
 			ConvertVssPathToRealPath(filename, rBackupLocation));




More information about the Boxbackup-commit mailing list