gh-59616: Support os.chmod(follow_symlinks=True) and os.lchmod() on Windows (GH-113049)

This commit is contained in:
Serhiy Storchaka 2023-12-14 13:28:37 +02:00 committed by GitHub
parent c6e953be12
commit 29f7eb4859
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 93 additions and 28 deletions

View file

@ -273,7 +273,7 @@ def _dont_follow_symlinks(func, path, *args):
# Pass follow_symlinks=False, unless not supported on this platform.
if func in _os.supports_follow_symlinks:
func(path, *args, follow_symlinks=False)
elif _os.name == 'nt' or not _os.path.islink(path):
elif not _os.path.islink(path):
func(path, *args)
def _resetperms(path):