[Box Backup-dev] COMMIT r883 - box/chris/merge/lib/backupstore

boxbackup-dev@fluffy.co.uk boxbackup-dev@fluffy.co.uk
Thu, 31 Aug 2006 23:24:00 +0100


Author: chris
Date: 2006-08-31 23:24:00 +0100 (Thu, 31 Aug 2006)
New Revision: 883

Modified:
   box/chris/merge/lib/backupstore/BackupStoreCheck.cpp
Log:
Use DIRECTORY_SEPARATOR instead of assuming that it's a forward slash
(refs #3)


Modified: box/chris/merge/lib/backupstore/BackupStoreCheck.cpp
===================================================================
--- box/chris/merge/lib/backupstore/BackupStoreCheck.cpp	2006-08-31 22:22:35 UTC (rev 882)
+++ box/chris/merge/lib/backupstore/BackupStoreCheck.cpp	2006-08-31 22:24:00 UTC (rev 883)
@@ -328,7 +328,8 @@
 	std::string dirName;
 	StoreStructure::MakeObjectFilename(StartID, mStoreRoot, mDiscSetNumber, dirName, false /* don't make sure the dir exists */);
 	// Check expectations
-	ASSERT(dirName.size() > 4 && dirName[dirName.size() - 4] == '/');
+	ASSERT(dirName.size() > 4 && 
+		dirName[dirName.size() - 4] == DIRECTORY_SEPARATOR_ASCHAR);
 	// Remove the filename from it
 	dirName.resize(dirName.size() - 4); // four chars for "/o00"
 	
@@ -377,7 +378,9 @@
 		if(!fileOK)
 		{
 			// Unexpected or bad file, delete it
-			::printf("Spurious file %s/%s found%s\n", dirName.c_str(), (*i).c_str(), mFixErrors?", deleting":"");
+			::printf("Spurious file %s" DIRECTORY_SEPARATOR "%s "
+				"found%s\n", dirName.c_str(), (*i).c_str(), 
+				mFixErrors?", deleting":"");
 			++mNumberErrorsFound;
 			if(mFixErrors)
 			{