1
0
Fork 0

deleting recursively

This commit is contained in:
Christian Kühnel 2020-04-16 11:23:02 +02:00
parent 2850e18a47
commit e3b384dc7f

View file

@ -156,7 +156,7 @@ def secure_delete(path: str):
if not os.path.exists(name): if not os.path.exists(name):
return return
os.chmod(name, stat.S_IWRITE) os.chmod(name, stat.S_IWRITE)
os.unlink(name) secure_delete(name)
shutil.rmtree(path, onerror=del_rw) shutil.rmtree(path, onerror=del_rw)