Steve Dower <[email protected]> added the comment:
The discussion on the PR has raised one scenario where our algorithm conflicts
with what we can reasonably emulate from the IO manager (which is itself not
entirely self-consistent):
If you call ntpath.realpath(r"C:\spam\eggs") where "spam" is a symlink/junction
to "D:\foo\baz" and "D:\foo\baz\eggs" is a relative symlink to "..\bar" and
"D:\foo\bar" does not exist, we will incorrectly return "C:\bar".
Note that if "D:\foo\bar" *does* exist, we will return the correct result. And
if "C:\spam" is *not* a symlink/junction, we will return the correct result.
Essentially, we fail in the case where ntpath.exists(X) fails and
realpath(dirname(X)) != dirname(X) and readlink(X).startswith("..\\") is True.
Considering it's taken months of patient explanation from Eryk Sun for me to
understand this, and nobody has ever complained about it, I'm prepared to call
it a known limitation.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue38453>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com