Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Harmonize shutil.copymode() on Windows and POSIX #113188

Closed
Labels
@serhiy-storchaka

Description

@serhiy-storchaka

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().

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp