From 683106fd899fe6126ab58f08c8f2df831488cc10 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 23 Aug 2014 08:04:04 +0530 Subject: [PATCH] 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) --- src/calibre/ebooks/oeb/polish/container.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/polish/container.py b/src/calibre/ebooks/oeb/polish/container.py index f17740424ff7..4a69c52bacd2 100644 --- a/src/calibre/ebooks/oeb/polish/container.py +++ b/src/calibre/ebooks/oeb/polish/container.py @@ -927,7 +927,7 @@ def __init__(self, pathtoepub, log, clone_data=None, tdir=None): ' 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: