[issue12777] Inconsistent use of VOLUME_NAME_* with GetFinalPathNameByHandle
Antoine Pitrou
report at bugs.python.org
Thu Aug 18 16:32:27 CEST 2011
New submission from Antoine Pitrou <pitrou at free.fr>:
In the implementation of nt._getfinalpathname() (in posixmodule.c) we have:
/* We have a good handle to the target, use it to determine the
target path name. */
buf_size = Py_GetFinalPathNameByHandleW(hFile, 0, 0, VOLUME_NAME_NT);
[...]
result_length = Py_GetFinalPathNameByHandleW(hFile, target_path,
buf_size, VOLUME_NAME_DOS);
There doesn't seem to be a good reason to use VOLUME_NAME_NT in the first call and VOLUME_NAME_DOS in the second. Especially given the second call might require more characters than the first call, and therefore return a truncated path.
----------
components: Library (Lib)
messages: 142325
nosy: brian.curtin, pitrou, tim.golden
priority: low
severity: normal
status: open
title: Inconsistent use of VOLUME_NAME_* with GetFinalPathNameByHandle
type: behavior
versions: Python 3.2, Python 3.3
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12777>
_______________________________________
More information about the Python-bugs-list
mailing list