From e373c822e2155f7595b1291764cb3030f418f282 Mon Sep 17 00:00:00 2001 From: Li Fanxi Date: Thu, 3 Mar 2011 00:06:34 +0800 Subject: [PATCH] [Bug] A better way to workaround a strange problem when extracting some SNB files with PDF contents. --- src/calibre/ebooks/snb/snbfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/ebooks/snb/snbfile.py b/src/calibre/ebooks/snb/snbfile.py index 10aa6a8715..9a7d65e417 100644 --- a/src/calibre/ebooks/snb/snbfile.py +++ b/src/calibre/ebooks/snb/snbfile.py @@ -83,6 +83,8 @@ class SNBFile: data = snbFile.read(bSize) if len(data) < 32768: uncompressedData += bzdc.decompress(data) + else: + uncompressedData += data except Exception, e: print e if len(uncompressedData) != self.plainStreamSizeUncompressed: