[Box Backup-commit] COMMIT r1268 - box/chris/merge/bin/bbstored
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Wed, 17 Jan 2007 22:23:36 +0000
Author: chris
Date: 2007-01-17 22:23:36 +0000 (Wed, 17 Jan 2007)
New Revision: 1268
Modified:
box/chris/merge/bin/bbstored/BackupCommands.cpp
Log:
Buffer store file integrity checks (refs #3)
Modified: box/chris/merge/bin/bbstored/BackupCommands.cpp
===================================================================
--- box/chris/merge/bin/bbstored/BackupCommands.cpp 2007-01-17 22:23:04 UTC (rev 1267)
+++ box/chris/merge/bin/bbstored/BackupCommands.cpp 2007-01-17 22:23:36 UTC (rev 1268)
@@ -30,6 +30,7 @@
#include "RaidFileController.h"
#include "FileStream.h"
#include "InvisibleTempFileStream.h"
+#include "BufferedStream.h"
#include "MemLeakFindOn.h"
@@ -388,9 +389,10 @@
// Open the object
std::auto_ptr<IOStream> object(rContext.OpenObject(mObjectID));
+ BufferedStream buf(*object);
// Verify it
- if(!BackupStoreFile::VerifyEncodedFileFormat(*object))
+ if(!BackupStoreFile::VerifyEncodedFileFormat(buf))
{
return std::auto_ptr<ProtocolObject>(new BackupProtocolServerError(
BackupProtocolServerError::ErrorType, BackupProtocolServerError::Err_FileDoesNotVerify));