mirror of
https://github.com/ciromattia/kcc
synced 2026-08-23 12:07:05 +00:00
Create the destination dir before flattening a single-subfolder archive (#1405)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user