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 Christian Åkerström, eric.smith, eryksun, ethan smith, ishimoto, jaraco, living180, miss-islington, ncdave4life, pablogsal, paul.moore, pitrou, steve.dower, stutzbach, takluyver, tim.golden, zach.ware, Étienne Dupuis
Date 2019-08-22.00:52:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
>> We can find code that does `relpath(realpath(target), 
>> realpath(start))` to compute the relative path to target 
>> for a symlink. 
>> ...
> I don't know how common this scenario is, but I can certainly 
> say that it's never worked on Windows. You'd also end up with a 
> relative symlink in a _real_ directory somewhere (that the 
> junction was pointing at) that is unable to reach `target`, 
> because it's now being resolved against the wrong start.

With ntpath.realpath == ntpath.abspath, it actually works fine for just junctions because in most cases a mount point in Windows should be handled simply as just a directory, not resolved as its target. Revisit my example. This is what I showed when "C:/spam/scripts" is a junction. It's only wrong if the junction targets a directory symlink -- a chimeric mount-point-link that NT has made the mistake of allowing. (The kernel developers should have known to disallow this when they introduced Unix-like symlinks. When evaluating a mount point that targets a symlink, or any name-surrogate reparse point, it should fail the call as an invalid reparse point. For simplicity and our sanity, a mount point should always have consistent semantics in path parsing as a hard component that behaves like a regular directory. Then we could *always* handle it as just a directory -- whether it's local or remote. They messed up badly, IMO.)
Date User Action Args
2019-08-22 00:52:38eryksunsetrecipients: + eryksun, paul.moore, ishimoto, jaraco, pitrou, eric.smith, tim.golden, stutzbach, living180, takluyver, zach.ware, ncdave4life, steve.dower, Christian Åkerström, ethan smith, pablogsal, Étienne Dupuis, miss-islington
2019-08-22 00:52:38eryksunsetmessageid: <>
2019-08-22 00:52:38eryksunlinkissue9949 messages
2019-08-22 00:52:38eryksuncreate