diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-04-29 13:48:55 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-04-29 13:48:55 +0000 |
commit | 6d029275a46a9408a797b197c6f31d48c470b065 (patch) | |
tree | 4deb970da64c1cbe30f1619321a55a917969807c | |
parent | 1e0c90956567752044545f3ef4876415da9e9700 (diff) |
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)
-rw-r--r-- | lib/backupclient/BackupStoreFile.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/backupclient/BackupStoreFile.cpp b/lib/backupclient/BackupStoreFile.cpp index 5e800970..75095fa4 100644 --- a/lib/backupclient/BackupStoreFile.cpp +++ b/lib/backupclient/BackupStoreFile.cpp @@ -299,7 +299,13 @@ void BackupStoreFile::DecodeFile(IOStream &rEncodedFile, const char *DecodedFile // 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); |