mirror of
https://github.com/ciromattia/kcc
synced 2025-12-13 01:36:27 +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))
|
||||
except OSError as 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:
|
||||
print("WARNING: Source files are probably created by KCC. The second conversion will decrease quality.")
|
||||
if GUI:
|
||||
|
||||
Reference in New Issue
Block a user