[Box Backup-dev] COMMIT r697 - box/chris/general/bin/bbackupquery

boxbackup-dev@fluffy.co.uk boxbackup-dev@fluffy.co.uk
Wed, 26 Jul 2006 23:15:04 +0000 (GMT)


Author: chris
Date: 2006-07-26 23:15:01 +0000 (Wed, 26 Jul 2006)
New Revision: 697

Modified:
   box/chris/general/bin/bbackupquery/BackupQueries.cpp
Log:
* BackupQueries.cpp
- Compare the attribute modification time (really the creation time)
  when comparing under Win32
- Fixed a compiler warning about comparing signed and unsigned values


Modified: box/chris/general/bin/bbackupquery/BackupQueries.cpp
===================================================================
--- box/chris/general/bin/bbackupquery/BackupQueries.cpp	2006-07-26 23:14:15 UTC (rev 696)
+++ box/chris/general/bin/bbackupquery/BackupQueries.cpp	2006-07-26 23:15:01 UTC (rev 697)
@@ -897,7 +897,7 @@
 		if(!opts['i'])
 		{
 			// does this remote filename include a path?
-			int index = fileName.rfind('/');
+			std::string::size_type index = fileName.rfind('/');
 			if(index != std::string::npos)
 			{
 				std::string dirName(fileName.substr(0, index));
@@ -1550,9 +1550,17 @@
 						BackupClientFileAttributes localAttr;
 						localAttr.ReadAttributes(localPath.c_str(), false /* don't zero mod times */, &fileModTime);					
 						modifiedAfterLastSync = (fileModTime > rParams.mLatestFileUploadTime);
+						bool ignoreAttrModTime = true;
+
+						#ifdef WIN32
+						// attr mod time is really
+						// creation time, so check it
+						ignoreAttrModTime = false;
+						#endif
+
 						if(!rParams.mIgnoreAttributes &&
 						   !localAttr.Compare(fileOnServerStream->GetAttributes(),
-								true /* ignore attr mod time */,
+								ignoreAttrModTime,
 								fileOnServerStream->IsSymLink() /* ignore modification time if it's a symlink */))
 						{
 							printf("Local file '%s' "