mirror of
https://github.com/Tygs/0bin.git
synced 2023-08-10 21:13:00 +03:00
fix(burn_after_reading): removes empty directories
This commit is contained in:
parent
4de492fb84
commit
9e5c4ea2b1
@ -305,7 +305,9 @@ class Paste(object):
|
||||
deleted_paste = 0
|
||||
|
||||
if os.path.exists(path):
|
||||
for folder, _ , files in os.walk(path):
|
||||
for folder, subfolders , files in os.walk(path):
|
||||
if len(files) == 0 and len(subfolders) == 0:
|
||||
os.rmdir(folder)
|
||||
for fname in files:
|
||||
if fname in ignore_files:
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user