[issue15880] os.path.split() and long UNC names

2012-09-07 Thread Kalle Rutanen
Kalle Rutanen added the comment: It seems to me that this problem can be fixed by replacing splitdrive with splitunc at line 170 in ntpath.py. -- ___ Python tracker <http://bugs.python.org/issue15

[issue15880] os.path.split() and long UNC names

2012-09-07 Thread Kalle Rutanen
Kalle Rutanen added the comment: By inspecting the code for os.path.split() in ntpath.py, one sees that the problem is actually in os.path.splitdrive(), which does not handle long-UNC paths. -- ___ Python tracker <http://bugs.python.org/issue15

[issue15880] os.path.split() and long UNC names

2012-09-07 Thread Kalle Rutanen
New submission from Kalle Rutanen: On Windows, long-UNC paths are needed to inspect and modify paths with more than 260 characters. The os.path.split() function behaves incorrectly in the presence of a long-UNC prefix //?/ or \\?\. Consider iterating d = os.path.split(d)[0] with d = '