Message348110
> 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(). |
|
Date |
User |
Action |
Args |
2019-07-18 11:18:04 | eryksun | set | recipients:
+ eryksun, larry, serhiy.storchaka, jo-he |
2019-07-18 11:18:03 | eryksun | set | messageid: <1563448683.95.0.779748912209.issue37612@roundup.psfhosted.org> |
2019-07-18 11:18:03 | eryksun | link | issue37612 messages |
2019-07-18 11:18:03 | eryksun | create | |
|