[Box Backup-dev] COMMIT r861 - box/chris/merge/bin/bbstored
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Thu, 31 Aug 2006 20:59:03 +0100
Author: chris
Date: 2006-08-31 20:59:02 +0100 (Thu, 31 Aug 2006)
New Revision: 861
Modified:
box/chris/merge/bin/bbstored/BackupCommands.cpp
Log:
* bin/bbstored/BackupCommands.cpp
- Use the same code for file names and file closing on other platforms
that's needed on Win32
Modified: box/chris/merge/bin/bbstored/BackupCommands.cpp
===================================================================
--- box/chris/merge/bin/bbstored/BackupCommands.cpp 2006-08-31 08:51:44 UTC (rev 860)
+++ box/chris/merge/bin/bbstored/BackupCommands.cpp 2006-08-31 19:59:02 UTC (rev 861)
@@ -332,15 +332,11 @@
std::auto_ptr<IOStream> diff2(rContext.OpenObject(patchID));
// Choose a temporary filename for the result of the combination
-#ifdef WIN32
std::ostringstream fs(rContext.GetStoreRoot());
fs << ".recombinetemp.";
fs << p;
std::string tempFn(fs.str());
tempFn = RaidFileController::DiscSetPathToFileSystemPath(rContext.GetStoreDiscSet(), tempFn, p + 16);
-#else
- std::string tempFn(RaidFileController::DiscSetPathToFileSystemPath(rContext.GetStoreDiscSet(), rContext.GetStoreRoot() + ".recombinetemp", p + 16 /* rotate which disc it's on */));
-#endif
// Open the temporary file
std::auto_ptr<IOStream> combined;
@@ -380,9 +376,7 @@
combined->Seek(0, IOStream::SeekType_Absolute);
// Then shuffle round for the next go
-#ifdef WIN32
if (from.get()) from->Close();
-#endif
from = combined;
}