Fix #5471 (Cannot import ePub book to 0.6.51)

This commit is contained in:
Kovid Goyal 2010-05-09 10:47:11 -06:00
parent 24b89df761
commit 8a4f0d80a3

View File

@ -133,11 +133,11 @@ def get_cover(opf, opf_path, stream, reader=None):
stream.seek(0)
zf = ZipFile(stream)
if raster_cover:
if reader is not None and \
reader.encryption_meta.is_encrypted(raster_cover):
return
base = posixpath.dirname(opf_path)
cpath = posixpath.normpath(posixpath.join(base, raster_cover))
if reader is not None and \
reader.encryption_meta.is_encrypted(cpath):
return
try:
member = zf.getinfo(cpath)
except: