Commit 342e298f authored by Serhiy Storchaka's avatar Serhiy Storchaka

Issue #28666: Fix removing readonly directories on Windows.

parent 6b5c9d09
......@@ -363,7 +363,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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment