This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Incorrect shutil.copytree() behaviour with symlinks
Type: behavior Stage: patch review
Components: Library (Lib) Versions: Python 3.11
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: vajdaz
Priority: normal Keywords: patch

Created on 2022-03-17 18:50 by vajdaz, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 31967 open vajdaz, 2022-03-17 18:56
Messages (2)
msg415437 - (view) Author: Zoltan Vajda (vajdaz) * Date: 2022-03-17 18:50
shutil.copytree incorrectly does not copy symlink contents if called
with symlink=False and ignore_dangling_symlinks=True.

The wrong behaviour can be reproduced like this:

$ tree
└── a
    ├── a.txt
    └── b
        └── a.txt -> ../a.txt

$ python3 -c "import shutil;shutil.copytree('a/b', 'c', symlinks=False, ignore_dangling_symlinks=True)"

As a result directoy c will be created but it will remain empty.
Expected result is a file c/a.txt with the contents of a/b/a.txt.
msg416700 - (view) Author: Zoltan Vajda (vajdaz) * Date: 2022-04-04 22:13
Because I am a first contributor, the automatic quality checks on GitHub have to be manually started by somebody. How can I reqest this and by whom?
Date User Action Args
2022-04-11 14:59:57adminsetgithub: 91205
2022-04-04 22:13:23vajdazsettype: behavior
messages: + msg416700
2022-03-17 18:56:16vajdazsetkeywords: + patch
stage: patch review
pull_requests: + pull_request30055
2022-03-17 18:50:19vajdazcreate