[issue27827] pathlib is_reserved fails for some reserved paths on Windows

Eryk Sun report at bugs.python.org
Sat Aug 27 02:42:44 EDT 2016


Eryk Sun added the comment:

Also, "CONIN$" and "CONOUT$" need to be added to the list of reserved names. Prior to Windows 8 these two names are reserved only for the current directory, which for the most part also applies to "CON". 

For Windows 8+, the redesign to use a real console device means that these three console devices are handled in exactly the same way as the other reserved DOS device names. For example:

Windows 10

    >>> print(os.path.abspath('C:/Temp/conout$  : spam . eggs'))
    \\.\conout$

Windows 7

    >>> print(os.path.abspath('C:/Temp/conout$  : spam . eggs'))
    C:\Temp\conout$  : spam . eggs

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27827>
_______________________________________


More information about the Python-bugs-list mailing list