[issue9949] os.path.realpath on Windows does not follow symbolic links

Steve Dower report at bugs.python.org
Wed Aug 21 18:25:08 EDT 2019


Steve Dower <steve.dower at python.org> added the comment:

Okay, the venv break is related (and it should have broken more frequently).

The new realpath() implementation leaves the \\?\ prefix behind if the path doesn't exist, since that's the error you get when the path is longer than MAX_PATH and you're on a system that can't handle it.

I think the best fix is probably to strip the prefix if the file didn't exist at the start and still doesn't exist afterwards.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue9949>
_______________________________________


More information about the Python-bugs-list mailing list