Create the destination dir before flattening a single-subfolder archive (#1405)

This commit is contained in:
Nils Leo
2026-07-23 22:43:16 -07:00
committed by GitHub
parent 59df22b62d
commit 2076775d94
+1
View File
@@ -984,6 +984,7 @@ def getWorkFolder(afile, workdir=None):
else:
workdir2 = mkdtemp('', 'KCC-')
fullPath2 = os.path.join(workdir2, 'OEBPS', 'Images')
os.makedirs(fullPath2, exist_ok=True)
for file in os.listdir(os.path.join(fullPath, tdir[0])):
move(os.path.join(fullPath, tdir[0], file), fullPath2)
rmtree(workdir, True)