New submission from Armin Rigo:
Calling Python 2.7's new version of ntpath.splitdrive() with argument either
'//' or r'\\' results in an IndexError: string index out of range.
--
messages: 226163
nosy: arigo
priority: normal
severity: normal
status: open
title: ntpath.splitdrive('//')
Armin Rigo added the comment:
For completeness:
Python 2.7.6: ntpath.splitdrive('//') = ('', '//')
Python 2.7.8: ntpath.splitdrive('//') = IndexError
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22312
eryksun added the comment:
Line 116 should use normp[2:3] instead of normp[2].
http://hg.python.org/cpython/file/ee879c0ffa11/Lib/ntpath.py#l92
--
nosy: +eryksun
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22312
Roundup Robot added the comment:
New changeset 446d4dfcc220 by Benjamin Peterson in branch '2.7':
don't index outside of the path (closes #22312)
http://hg.python.org/cpython/rev/446d4dfcc220
--
nosy: +python-dev
resolution: - fixed
stage: - resolved
status: open - closed