[issue19844] os.path.split fails on windows path

Hanz Kanst report at bugs.python.org
Sat Nov 30 18:06:09 CET 2013


New submission from Hanz Kanst:

os.path.split fails on windows path
to reproduce in python 3.3:

file = "C:\progs\python\test\target\Amy Winehouse\Amy Winehouse - Back To Black (2006)\01 - Rehab.ogg"
os.path.split(os.path.abspath(file))[0]
returns
'C:\\progs\\python\testordner\target\\Amy Winehouse'
and
os.path.split(os.path.abspath(file))[1]
returns
'Amy Winehouse - Back To Black (2006)\x01 - Rehab.ogg'

According to the definition the tail should never contain a tail.

----------

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


More information about the Python-bugs-list mailing list