[New-bugs-announce] [issue15286] normpath does not work with local literal paths

Manuel de la Pena report at bugs.python.org
Sat Jul 7 18:47:22 CEST 2012


New submission from Manuel de la Pena <manuel at canonical.com>:

Local literal paths are those paths that do use the \\?\ that allows to have paths longer that the MAX_PATH set by Windows (http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx#short_vs._long_names).

While UNC (http://en.wikipedia.org/wiki/Path_%28computing%29) paths should not be normalized, local paths that do use the \\?\ prefix should so that developers that use such a trink to allow longer paths on windows do not have to wrapp the call in the following way:

LONG_PATH_PREFIX = '\\?\'
path = path.replace(LONG_PATH_PREFIX, '')
result = LONG_PATH_PREFIX + os.path.normpath(path)

The possible solution would be for the normalization to work and return the path normalized with the prefix added.

----------
components: Windows
files: literal-normpath.patch
hgrepos: 141
keywords: patch
messages: 164909
nosy: mandel
priority: normal
severity: normal
status: open
title: normpath does not work with local literal paths
versions: Python 3.3
Added file: http://bugs.python.org/file26307/literal-normpath.patch

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


More information about the New-bugs-announce mailing list