Book polishing: Fix EPUB files with corrupted ZIP central directories not working and leaving behind detritus in the current working directory. Fixes #1360385 [Debris left when polish books fails](https://bugs.launchpad.net/calibre/+bug/1360385)

This commit is contained in:
Kovid Goyal 2014-08-23 08:04:04 +05:30
parent b6579971b3
commit 683106fd89

View File

@ -927,7 +927,7 @@ class EpubContainer(Container):
' more forgiving ZIP parser')
from calibre.utils.localunzip import extractall
stream.seek(0)
extractall(stream)
extractall(stream, path=tdir)
try:
os.remove(join(tdir, 'mimetype'))
except EnvironmentError: