[issue22302] Windows os.path.isabs UNC path bug

eryksun report at bugs.python.org
Fri Sep 5 21:09:11 CEST 2014


eryksun added the comment:

> "//server" is just the same as "/server" or "///server".

Repeated slashes aren't collapsed at the start of a Windows path. Here's what I get in Windows 7:

    >>> os.listdir('/server')   
    []
    >>> os.listdir('//server')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    FileNotFoundError: [WinError 53] The network path was not found: '//server'
    >>> os.listdir('///server')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    FileNotFoundError: [WinError 161] The specified path is invalid: '///server'

----------

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


More information about the Python-bugs-list mailing list