mirror of
https://github.com/ciromattia/kcc
synced 2026-05-30 19:23:06 +00:00
fusion temp file cleanup improvements (#1359)
This commit is contained in:
@@ -557,13 +557,6 @@ class WorkerThread(QThread):
|
|||||||
move(item, GUI.targetDirectory)
|
move(item, GUI.targetDirectory)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
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.content = ''
|
||||||
GUI.progress.stop()
|
GUI.progress.stop()
|
||||||
MW.hideProgressBar.emit()
|
MW.hideProgressBar.emit()
|
||||||
|
|||||||
@@ -86,13 +86,6 @@ def main(argv=None):
|
|||||||
print('Working on ' + source + '...')
|
print('Working on ' + source + '...')
|
||||||
makeBook(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
|
return 0
|
||||||
|
|
||||||
|
|
||||||
@@ -1899,11 +1892,11 @@ def makeBook(source, qtgui=None, job_progress=''):
|
|||||||
|
|
||||||
end = perf_counter()
|
end = perf_counter()
|
||||||
print(f"{job_progress}makeBook: {end - start} seconds")
|
print(f"{job_progress}makeBook: {end - start} seconds")
|
||||||
# Clean up temporary workspace
|
|
||||||
try:
|
if options.filefusion:
|
||||||
rmtree(path, True)
|
rmtree(source, True)
|
||||||
except Exception:
|
checkPre('LLL-')
|
||||||
pass
|
|
||||||
return filepath
|
return filepath
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user