Eryk Sun <[email protected]> added the comment:
This should be fixed. That said, we have to use a unicode string for a long
path anyway. Prior to Windows 8, the conversion from ANSI to Unicode in the
system runtime library uses a static MAX_PATH buffer, so the ANSI API is
inherently limited to MAX_PATH. You'll see this in the documentation of all
functions that allow using \\?\ extended paths:
In the ANSI version of this function, the name is limited to
MAX_PATH characters. To extend this limit to 32,767 wide
characters, call the Unicode version of the function and
prepend "\\?\" to the path.
Decoding ANSI strings uses a dynamically-sized buffer in Windows 8, but the
change is undocumented and should not be relied upon.
Unfortunately, we can't reliably use a raw unicode string literal in Python 2,
since \u and \U escapes are still evaluated. We can instead use forward slashes
and normalize via os.path.normpath.
----------
nosy: +eryksun
stage: patch review ->
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue32539>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com