Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 09285e0

Browse files
Issue #28666: Try to fix removing readonly directories on Windows.
1 parent 8551495 commit 09285e0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/test/support/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def _rmtree_inner(path):
364364
else:
365365
_force_run(path, os.unlink, fullname)
366366
_waitfor(_rmtree_inner, path, waitall=True)
367-
_waitfor(os.rmdir, path)
367+
_waitfor(lambda p: _force_run(p, os.rmdir, p), path)
368368
else:
369369
_unlink = os.unlink
370370
_rmdir = os.rmdir

0 commit comments

Comments
 (0)