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

Skip to content

Commit bbfe6c3

Browse files
Issue #28666: Fix removing readonly directories on Windows.
1 parent 2ccb988 commit bbfe6c3

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
@@ -363,7 +363,7 @@ def _rmtree_inner(path):
363363
else:
364364
_force_run(path, os.unlink, fullname)
365365
_waitfor(_rmtree_inner, path, waitall=True)
366-
_waitfor(os.rmdir, path)
366+
_waitfor(lambda p: _force_run(p, os.rmdir, p), path)
367367
else:
368368
_unlink = os.unlink
369369
_rmdir = os.rmdir

0 commit comments

Comments
 (0)