Eryk Sun added the comment:

isabs also fails for device paths such as r"\\.\C:", which is an absolute path 
for opening the C: volume. UNC and device paths (i.e. \\server, \\?, and \\.) 
should always be considered absolute. Only logical drives (i.e. C:, D:, etc) 
support drive-relative paths.

Also, join() needs to be smarter in this case:

    >>> os.path.join(r'\\.\C:', 'spam')
    '\\\\.\\C:spam'

It doesn't insert a backslash because the 'drive' ends in a colon. It needs to 
always insert a backslash for UNC paths, which cannot be reliably identified by 
checking whether the last character of the drive is a colon.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22302>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to