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

subversion at boxbackup.org subversion at boxbackup.org
Sun Jan 9 11:59:10 GMT 2011


Author: chris
Date: 2011-01-09 11:59:10 +0000 (Sun, 09 Jan 2011)
New Revision: 2839

Modified:
   box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp
Log:
Workaround for apparent btrfs bug, where symlinks appear to be on a
different filesystem than their containing directory, by only checking
for a different filesystem when checking directories, because files and
special files can't be mount points anyway. Thanks to Toke
Hoiland-Jorgensen.


Modified: box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp
===================================================================
--- box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp	2011-01-09 11:54:00 UTC (rev 2838)
+++ box/trunk/bin/bbackupd/BackupClientDirectoryRecord.cpp	2011-01-09 11:59:10 UTC (rev 2839)
@@ -325,7 +325,14 @@
 					file_st.st_dev << "/" <<
 					file_st.st_ino);
 
-				if(file_st.st_dev != dest_st.st_dev)
+				int type = file_st.st_mode & S_IFMT;
+
+				/* Workaround for apparent btrfs bug, where
+				symlinks appear to be on a different filesystem
+				than their containing directory, thanks to
+				Toke Hoiland-Jorgensen */
+				if(type == S_IFDIR &&
+					file_st.st_dev != dest_st.st_dev)
 				{
 					if(!(rParams.mrContext.ExcludeDir(
 						filename)))
@@ -335,8 +342,6 @@
 					}
 					continue;
 				}
-
-				int type = file_st.st_mode & S_IFMT;
 				#endif
 
 				if(type == S_IFREG || type == S_IFLNK)




More information about the Boxbackup-commit mailing list