New submission from theger <heger.to...@gmail.com>:
This might not be an issue at all and maybe I'm just missing something but this confused me a bit and hence the question in title. Python's shutil.copyfile() has a follow_symlinks argument but it only affects the source, not the destination - i.e. when src is a symlink, it makes a difference whether the flag is set (and then it will copy the destination of that src symlink) or not (and then it will just create a new symlink in dst pointing to the src symlink's destination). I hope it's clear so far. When dst is a link though, the flag doesn't change anything and it will always copy that file to the dst symlink's destination. My question is... If dst is a symlink and follow_symlinks flag is not set, wouldn't it be more logical if the dst symlink was just replaced by a copy of src instead of copying src to dst's destination? Thanks and sorry if this is just noise. ---------- components: Library (Lib) messages: 323373 nosy: theger priority: normal severity: normal status: open title: Shouldn't shutil.copyfile replace link in dst with follow_symlinks set? type: behavior versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34374> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com