[Box Backup-commit] COMMIT r2835 - box/trunk/bin/bbstored

subversion at boxbackup.org subversion at boxbackup.org
Sun Jan 9 01:56:36 GMT 2011


Author: chris
Date: 2011-01-09 01:56:36 +0000 (Sun, 09 Jan 2011)
New Revision: 2835

Modified:
   box/trunk/bin/bbstored/BackupCommands.cpp
Log:
Fix incorrect generation of temporary file name for applying
patches while restoring old versions of files, many thanks to
Matto Marjanovic for debugging this issue and submitting a
patch!


Modified: box/trunk/bin/bbstored/BackupCommands.cpp
===================================================================
--- box/trunk/bin/bbstored/BackupCommands.cpp	2011-01-08 22:14:24 UTC (rev 2834)
+++ box/trunk/bin/bbstored/BackupCommands.cpp	2011-01-09 01:56:36 UTC (rev 2835)
@@ -388,11 +388,12 @@
 			std::auto_ptr<IOStream> diff2(rContext.OpenObject(patchID));
 			
 			// Choose a temporary filename for the result of the combination
-			std::ostringstream fs(rContext.GetStoreRoot());
-			fs << ".recombinetemp.";
-			fs << p;
-			std::string tempFn(fs.str());
-			tempFn = RaidFileController::DiscSetPathToFileSystemPath(rContext.GetStoreDiscSet(), tempFn, p + 16);
+			std::ostringstream fs;
+			fs << rContext.GetStoreRoot() << ".recombinetemp." << p;
+			std::string tempFn = 
+				RaidFileController::DiscSetPathToFileSystemPath(
+					rContext.GetStoreDiscSet(), fs.str(),
+					p + 16);
 			
 			// Open the temporary file
 			std::auto_ptr<IOStream> combined;




More information about the Boxbackup-commit mailing list