diff --git a/kindlecomicconverter/KCC_gui.py b/kindlecomicconverter/KCC_gui.py index 0558e74..e0aa34b 100644 --- a/kindlecomicconverter/KCC_gui.py +++ b/kindlecomicconverter/KCC_gui.py @@ -557,13 +557,6 @@ class WorkerThread(QThread): move(item, GUI.targetDirectory) except Exception: pass - if options.filefusion: - for path in currentJobs: - if os.path.isfile(path): - os.remove(path) - elif os.path.isdir(path): - rmtree(path, True) - comic2ebook.checkPre('LLL-') GUI.progress.content = '' GUI.progress.stop() MW.hideProgressBar.emit() diff --git a/kindlecomicconverter/comic2ebook.py b/kindlecomicconverter/comic2ebook.py index 56164bf..999d68f 100755 --- a/kindlecomicconverter/comic2ebook.py +++ b/kindlecomicconverter/comic2ebook.py @@ -86,13 +86,6 @@ def main(argv=None): print('Working on ' + source + '...') makeBook(source) - if options.filefusion: - for path in sources: - if os.path.isfile(path): - os.remove(path) - elif os.path.isdir(path): - rmtree(path, True) - checkPre('LLL-') return 0 @@ -1899,11 +1892,11 @@ def makeBook(source, qtgui=None, job_progress=''): end = perf_counter() print(f"{job_progress}makeBook: {end - start} seconds") - # Clean up temporary workspace - try: - rmtree(path, True) - except Exception: - pass + + if options.filefusion: + rmtree(source, True) + checkPre('LLL-') + return filepath