[Box Backup-commit] COMMIT r1957 - box/chris/general/lib/backupclient

boxbackup-dev@fluffy.co.uk boxbackup-dev@fluffy.co.uk
Sat, 8 Dec 2007 22:01:04 +0000 (UTC)


Author: chris
Date: 2007-12-08 22:01:04 +0000 (Sat, 08 Dec 2007)
New Revision: 1957

Modified:
   box/chris/general/lib/backupclient/BackupClientFileAttributes.cpp
Log:
Ignore time differences less than 1 second when comparing attributes,
as not all filesystems can store times that accurately (e.g. OSX).
(merges [1914])


Modified: box/chris/general/lib/backupclient/BackupClientFileAttributes.cpp
===================================================================
--- box/chris/general/lib/backupclient/BackupClientFileAttributes.cpp	2007-12-08 22:00:40 UTC (rev 1956)
+++ box/chris/general/lib/backupclient/BackupClientFileAttributes.cpp	2007-12-08 22:01:04 UTC (rev 1957)
@@ -248,7 +248,9 @@
 	
 	if(!IgnoreModTime)
 	{
-		if(a1->ModificationTime != a2->ModificationTime)
+		int t1 = a1->ModificationTime / 1000000;
+		int t2 = a2->ModificationTime / 1000000;
+		if(t1 != t2)
 		{
 			return false;
 		}
@@ -256,7 +258,9 @@
 
 	if(!IgnoreAttrModTime)
 	{
-		if(a1->AttrModificationTime != a2->AttrModificationTime)
+		int t1 = a1->AttrModificationTime / 1000000;
+		int t2 = a2->AttrModificationTime / 1000000;
+		if(t1 != t2)
 		{
 			return false;
 		}