Issue #28666: Try to fix removing readonly directories on Windows.

This commit is contained in:
Serhiy Storchaka 2016-11-20 20:04:54 +02:00
parent 8551495ad1
commit 09285e019d
1 changed files with 1 additions and 1 deletions

View File

@ -364,7 +364,7 @@ if sys.platform.startswith("win"):
else:
_force_run(path, os.unlink, fullname)
_waitfor(_rmtree_inner, path, waitall=True)
_waitfor(os.rmdir, path)
_waitfor(lambda p: _force_run(p, os.rmdir, p), path)
else:
_unlink = os.unlink
_rmdir = os.rmdir