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.

Author vajdaz
Recipients vajdaz
Date 2022-03-17.18:50:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1647543019.32.0.96447570107.issue47049@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2022-03-17 18:50:19vajdazsetrecipients: + vajdaz
2022-03-17 18:50:19vajdazsetmessageid: <1647543019.32.0.96447570107.issue47049@roundup.psfhosted.org>
2022-03-17 18:50:19vajdazlinkissue47049 messages
2022-03-17 18:50:19vajdazcreate