From e558ffd8076239b64562df241e0afe3dfd066fc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jastrz=C4=99bski?= Date: Tue, 13 Aug 2013 13:33:16 +0200 Subject: [PATCH] Temporary disabling new location of tmp files --- README.md | 1 - kcc/comic2ebook.py | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e06fa68..6b439eb 100644 --- a/README.md +++ b/README.md @@ -250,7 +250,6 @@ The app relies and includes the following scripts/binaries: ####3.2: * Too big EPUB files are now splitted before conversion to MOBI * Added experimental parser of manga webstrips -* Moved location of temporary files to increase conversion speed * Improved error handling ## KNOWN ISSUES diff --git a/kcc/comic2ebook.py b/kcc/comic2ebook.py index c39f8f4..4fba275 100755 --- a/kcc/comic2ebook.py +++ b/kcc/comic2ebook.py @@ -599,7 +599,8 @@ def genEpubStruct(path): def getWorkFolder(afile): if os.path.isdir(afile): - workdir = tempfile.mkdtemp('', 'KCC-TMP-', os.path.join(os.path.splitext(afile)[0], '..')) + workdir = tempfile.mkdtemp('', 'KCC-TMP-') + #workdir = tempfile.mkdtemp('', 'KCC-TMP-', os.path.join(os.path.splitext(afile)[0], '..')) try: os.rmdir(workdir) # needed for copytree() fails if dst already exists fullPath = os.path.join(workdir, 'OEBPS', 'Images') @@ -616,7 +617,8 @@ def getWorkFolder(afile): rmtree(path) raise UserWarning("Failed to extract images.") else: - workdir = tempfile.mkdtemp('', 'KCC-TMP-', os.path.dirname(afile)) + workdir = tempfile.mkdtemp('', 'KCC-TMP-') + #workdir = tempfile.mkdtemp('', 'KCC-TMP-', os.path.dirname(afile)) cbx = cbxarchive.CBxArchive(afile) if cbx.isCbxFile(): try: @@ -688,7 +690,8 @@ def getDirectorySize(start_path='.'): def createNewTome(parentPath): - tomePathRoot = tempfile.mkdtemp('', 'KCC-TMP-', parentPath) + tomePathRoot = tempfile.mkdtemp('', 'KCC-TMP-') + #tomePathRoot = tempfile.mkdtemp('', 'KCC-TMP-', parentPath) tomePath = os.path.join(tomePathRoot, 'OEBPS', 'Images') os.makedirs(tomePath) return tomePath, tomePathRoot