[issue14255] tempfile.gettempdir() didn't return the path with correct case.

Jeff McNeil report at bugs.python.org
Wed Mar 14 04:40:56 CET 2012


Jeff McNeil <jeff at jmcneil.net> added the comment:

The actual implementation calls os.path.normcase from tempfile._get_default_tempdir. In this scenario here, that resolves to the ntpath module & triggers a lowercase conversion.

On the other hand, the posixpath module is simply an identity function.

Now, it *is* possible to force a Windows file system to run in a case-sensitive configuration. Since ntpath.py forces lower case, this could actually cause breakage in that situation, however rare.

In my opinion, changing the ntpath.normcase function to retain case probably yields more correct behavior.

----------
nosy: +mcjeff

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


More information about the Python-bugs-list mailing list