1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-22 14:11:45 +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: else:
raise UserWarning("Failed to open source file/directory.") raise UserWarning("Failed to open source file/directory.")
newpath = mkdtemp('', 'KCC-', os.path.dirname(afile)) newpath = mkdtemp('', 'KCC-', os.path.dirname(afile))
copytree(path, os.path.join(newpath, 'OEBPS', 'Images')) os.renames(path, os.path.join(newpath, 'OEBPS', 'Images'))
rmtree(workdir, True)
return newpath return newpath