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 Andreas.Gäer, Patrick.von.Reth, brian.curtin, eryksun, lars.gustaebel, paul.moore, steve.dower, tim.golden, zach.ware
Date 2020-05-30.17:07:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1590858454.46.0.876165993211.issue13702@roundup.psfhosted.org>
In-reply-to
Content
This is still a problem with WinAPI CreateSymbolicLinkW. It fails to replace slashes with backslashes in the substitute path if it's a relative path, which creates a broken link. As a workaround, os.symlink should replace slashes with backslashes in relative target paths. Except drive-relative targets such as "C:spam" can be ignored, since CreateSymbolicLinkW is forced to normalize them as fully-qualified paths.

Non-UNC rooted paths such as "/Program Files/Python38" are also relative paths. (ntpath.isabs incorrectly classifies them as absolute.) A relative target path gets resolved against the parsed, opened path of the symlink. For example, consider a symlink on a volume at r"Eggs\spam.txt" that targets r"\spam.txt". If the volume is mounted at "W:\\", then accessing r"W:\Eggs\spam.txt" resolves to r"W:\spam.txt". But if the volume is mounted at r"C:\Mount\Work", then accessing r"C:\Mount\Work\Eggs\spam.txt" resolves to r"C:\spam.txt".
History
Date User Action Args
2020-05-30 17:07:34eryksunsetrecipients: + eryksun, paul.moore, lars.gustaebel, tim.golden, brian.curtin, Patrick.von.Reth, zach.ware, steve.dower, Andreas.Gäer
2020-05-30 17:07:34eryksunsetmessageid: <1590858454.46.0.876165993211.issue13702@roundup.psfhosted.org>
2020-05-30 17:07:34eryksunlinkissue13702 messages
2020-05-30 17:07:34eryksuncreate