1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-13 01:36:27 +00:00

saves several seconds per file (#841)

This commit is contained in:
Alex Xu
2025-02-28 20:11:11 -08:00
committed by GitHub
parent 62ffa2bc80
commit be147fe7e5

View File

@@ -672,8 +672,7 @@ def getWorkFolder(afile):
else:
raise UserWarning("Failed to open source file/directory.")
newpath = mkdtemp('', 'KCC-', os.path.dirname(afile))
copytree(path, os.path.join(newpath, 'OEBPS', 'Images'))
rmtree(workdir, True)
os.renames(path, os.path.join(newpath, 'OEBPS', 'Images'))
return newpath