[Box Backup-commit] COMMIT r1637 - box/chris/general/lib/backupclient
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Wed, 09 May 2007 11:31:25 +0100
Author: chris
Date: 2007-05-09 11:31:25 +0100 (Wed, 09 May 2007)
New Revision: 1637
Modified:
box/chris/general/lib/backupclient/BackupStoreFile.cpp
Log:
Remove assertion that we are at the end of the stream when decoding
finishes. This is not true when decoding raw files on disk.
(merges [1621])
Modified: box/chris/general/lib/backupclient/BackupStoreFile.cpp
===================================================================
--- box/chris/general/lib/backupclient/BackupStoreFile.cpp 2007-05-09 10:30:48 UTC (rev 1636)
+++ box/chris/general/lib/backupclient/BackupStoreFile.cpp 2007-05-09 10:31:25 UTC (rev 1637)
@@ -299,7 +299,13 @@
// out of our connection stream.
char buffer[1];
int drained = rEncodedFile.Read(buffer, 1);
- ASSERT(drained == 0);
+
+ // The Read will return 0 if we are actually at the end
+ // of the stream, but some tests decode files directly,
+ // in which case we are actually positioned at the start
+ // of the block index. I hope that reading an extra byte
+ // doesn't hurt!
+ // ASSERT(drained == 0);
// Write the attributes
stream->GetAttributes().WriteAttributes(DecodedFilename);