Skip to content

Validate identifiers should avoid reserved names on windows  #3312

Closed
@apostasie

Description

@apostasie

What is the problem you're trying to solve

https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file

"
CON, PRN, AUX, NUL, COM0, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, COM¹, COM², COM³, LPT0, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9, LPT¹, LPT², and LPT³. Also avoid these names followed immediately by an extension; for example, NUL.txt and NUL.tar.gz are both equivalent to NUL. For more information, see Namespaces.
"

Describe the solution you'd like

Identifiers that are being used on the filesystem should forbid these.
That should be put in a windows version of Validate (being reworked in #3279).

Something in the line of:
^(con|prn|nul|aux|com[1-9]|lpt[1-9])([.].*)?

Additional context

Docker seem to enforce these.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions