[issue4071] ntpath.abspath can fail on Win Server 2008 (64-bit)
Hirokazu Yamamoto
report at bugs.python.org
Wed Oct 8 04:23:13 CEST 2008
Hirokazu Yamamoto <ocean-city at m2.ccsnet.ne.jp> added the comment:
According to http://msdn.microsoft.com/en-us/library/aa364963.aspx,
current implementation have several problems.
>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.
:-(
>If the lpBuffer buffer is too small to contain the path, the return
>value is the size, in TCHARs, of the buffer that is required to hold
>the path and the terminating null character.
We should allocate new buffer with this size and retry like already
doing for GetCurrentDirectory.
And one decision problem... What should we do when too long str is
passed to ntpath._getfullpathname? Report overflow error? Or convert to
unicode and retry with GetFullPathNameW? Hmm....
----------
nosy: +ocean-city
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4071>
_______________________________________
More information about the Python-bugs-list
mailing list