Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Description
The behavior ofshutil.copymode() on Windows was changed by addingos.lchmod() in#59616. Now iffollow_symlinks is false and bothsrc anddst are symlinks, it copies the symlink mode (only the read-only bit). Previously it did nothing.
But there is still a difference between Windows and POSIX. Iffollow_symlinks is true anddst is a symlink, it sets the permission of the symlink on Windows (becauseos.chmod() still does not follow symlinks by default on Windows) and the permission of the target on POSIX.
shutil.copystat() has different behavior, because it passes thefollow_symlinks argument explicitly.
I propose to harmonizeshutil.copymode() behavior on Windows with POSIX and withshutil.copystat().