[issue12777] Inconsistent use of VOLUME_NAME_* with GetFinalPathNameByHandle

Jason R. Coombs report at bugs.python.org
Thu Aug 18 16:56:25 CEST 2011


Jason R. Coombs <jaraco at jaraco.com> added the comment:

I agree the two calls should probably be consistent, though I also suspect that VOLUME_NAME_NT is always longer than VOLUME_NAME_DOS.

My justification for using VOLUME_NAME_NT is that the final name might not be located on a DOS-accessible name. My suspicion was that VOLUME_NAME_NT was more general purpose (though somewhat less user-friendly), so preferable in the case that the name isn't exposed to the user. It's been a while since I've investigated it, but I think you can have symlinks to UNC paths as well as \\?\ paths, so my concern is VOLUME_NAME_DOS might not work with those paths. Some tests are probably called for.

In the case of nt._getfinalpathname(), it's not obvious to me how it might be used, so VOLUME_NAME_DOS may be more appropriate. Or perhaps _getfinalpathname should pass that parameter through.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12777>
_______________________________________


More information about the Python-bugs-list mailing list