deleting recursively
This commit is contained in:
parent
2850e18a47
commit
e3b384dc7f
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue