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 eryksun
Recipients eryksun, jo-he, larry, serhiy.storchaka
Date 2019-07-18.11:18:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1563448683.95.0.779748912209.issue37612@roundup.psfhosted.org>
In-reply-to
Content
> on Windows (where there is no linkat()) os.link() creates a new link
> to the symbolic link itself. 

Yes, CreateHardLinkW opens the source file by calling NtOpenFile with the option FILE_OPEN_REPARSE_POINT. So the behavior is follow_symlinks=False. 

Note, however, that Windows has distinct file and directory reparse points, so we can't hardlink to a directory symlink, or any other type of directory reparse point such as a junction mountpoint. In Unix, follow_symlinks=False (if implemented) allows creating a hardlink to a symlink that targets a directory.

Also, I noticed that I can pass follow_symlinks=False in Windows, but this should raise NotImplementedError. It's supposed to be checked via follow_symlinks_specified().
History
Date User Action Args
2019-07-18 11:18:04eryksunsetrecipients: + eryksun, larry, serhiy.storchaka, jo-he
2019-07-18 11:18:03eryksunsetmessageid: <1563448683.95.0.779748912209.issue37612@roundup.psfhosted.org>
2019-07-18 11:18:03eryksunlinkissue37612 messages
2019-07-18 11:18:03eryksuncreate