Eryk Sun <eryk...@gmail.com> added the comment:

> This will be the change to make "special" filenames only be 
> special when used on their own, and not as part of a path

For some reason, Windows 11 still reserves case-insensitive "nul" in qualified 
paths, but none of the other DOS device names. Thankfully it's just "nul", and 
not "nul.txt", since they changed it to never reserve a name with an extension. 
So "./nul" -> "\\.\nul", but "./nul.txt" resolve to the filename in the current 
directory.

For cases such as "./con" vs "con", this is another example in favor of 
changing ntpath.normpath() and pathlib.Path to preserve an initial leading dot 
component. Other cases include alternate data streams on single-letter 
filenames (e.g. accessing "C:stream" as "./C:stream") and executable paths that 
should explicitly refer to the current directory (e.g. "./spam.exe").

----------
nosy: +eryksun

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

Reply via email to