mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
b6579971b3
commit
683106fd89
@ -927,7 +927,7 @@ class EpubContainer(Container):
|
|||||||
' more forgiving ZIP parser')
|
' more forgiving ZIP parser')
|
||||||
from calibre.utils.localunzip import extractall
|
from calibre.utils.localunzip import extractall
|
||||||
stream.seek(0)
|
stream.seek(0)
|
||||||
extractall(stream)
|
extractall(stream, path=tdir)
|
||||||
try:
|
try:
|
||||||
os.remove(join(tdir, 'mimetype'))
|
os.remove(join(tdir, 'mimetype'))
|
||||||
except EnvironmentError:
|
except EnvironmentError:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user