[Box Backup-commit] COMMIT r1621 - box/chris/merge/lib/backupclient
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Sun, 29 Apr 2007 14:48:55 +0100
Author: chris
Date: 2007-04-29 14:48:55 +0100 (Sun, 29 Apr 2007)
New Revision: 1621
Modified:
box/chris/merge/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. (refs #3)
Modified: box/chris/merge/lib/backupclient/BackupStoreFile.cpp
===================================================================
--- box/chris/merge/lib/backupclient/BackupStoreFile.cpp 2007-04-29 13:47:48 UTC (rev 1620)
+++ box/chris/merge/lib/backupclient/BackupStoreFile.cpp 2007-04-29 13:48:55 UTC (rev 1621)
@@ -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);