Skip to content

Dealing with reserved file names under MS Windows #2961

@lefou

Description

@lefou

In PR #2959 I run into a hard diagnose issue with file names on MS Windows.

Here is a excerpt from an official Win32 documentation:

  • Do not use the following reserved names for the name of 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.

I think we should discuss a nice way to deal with it in Mill. Mill currently assumes all legal class names are supported. But having a target named con can fail on Windows with a uninformative error message. Since we create metadata files unter out/ like con.json, con.log and con.dest, which would all be illegal under a Windows file system namespace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions