mirror of
https://github.com/ciromattia/kcc
synced 2025-12-20 13:11:47 +00:00
remove nested empty folders (#900)
This commit is contained in:
@@ -936,6 +936,10 @@ def detectSuboptimalProcessing(tmppath, orgpath):
|
|||||||
os.remove(os.path.join(root, name))
|
os.remove(os.path.join(root, name))
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
raise RuntimeError(f"{name}: {e}")
|
raise RuntimeError(f"{name}: {e}")
|
||||||
|
# remove empty nested folders
|
||||||
|
for root, dirs, files in os.walk(tmppath, False):
|
||||||
|
if not files and not dirs:
|
||||||
|
os.rmdir(root)
|
||||||
if alreadyProcessed:
|
if alreadyProcessed:
|
||||||
print("WARNING: Source files are probably created by KCC. The second conversion will decrease quality.")
|
print("WARNING: Source files are probably created by KCC. The second conversion will decrease quality.")
|
||||||
if GUI:
|
if GUI:
|
||||||
|
|||||||
Reference in New Issue
Block a user