]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-113188: Fix shutil.copymode() and shutil.copystat() on Windows (GH-113285...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 23 Dec 2023 10:53:48 +0000 (11:53 +0100)
committerGitHub <noreply@github.com>
Sat, 23 Dec 2023 10:53:48 +0000 (12:53 +0200)
commit80b2bad2c2c4e34ee6bd8e6f1f9360f97aed6551
tree1b7e6af21d25b0cabeb7beff843f86c3923471fd
parent0bd134d15f48dc5e284f13f1545548cabf50c792
[3.11] gh-113188: Fix shutil.copymode() and shutil.copystat() on Windows (GH-113285) (GH-113426)

Previously they worked differenly if dst is a symbolic link:
they modified the permission bits of dst itself rather than the file
it points to if follow_symlinks is true or src is not a symbolic link,
and did nothing if follow_symlinks is false and src is a symbolic link.
(cherry picked from commit c7874bb56f862dd96a9a74b809dbea5688fa6c1c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/shutil.py
Lib/test/test_shutil.py
Misc/NEWS.d/next/Library/2023-12-15-20-29-49.gh-issue-113188.AvoraB.rst [new file with mode: 0644]