-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File name convention, reserved file names incomplete? #199
Comments
Also, I can create a file named "hello.com1.txt" on my Windows 10 21H2 (and some Windows XP) PC. Where does the
part in the spec come from? Is it maybe enough to just look at the string as a whole? Edit: I can't create a file named "com1 " (note the space) but "com1 .txt" is fine. |
Also, the spec says that e.g. "C:" is a reserved file name, but I don't think this needs to be checked, because the colon is already unconditionally replaced in the first step. |
The following links say somewhat inconsistent things about what is illegal and reserved:
I also found that I can't name things e.g. "com0.txt" on my Windows machine in Explorer, but can in PowerShell. Hm. So, maybe the algorithm needs to be changed a bit. If we say we support (V|ex)FAT, NTFS, HFS(+) and any POSIXy filesystem, as the 255 character limit suggests, and none of the old DOS crap, it could instead ensure:
How'd that sound? |
That sounds/seems fine. I would venture to guess that the last item (Trailing periods and spaces) may be a breaking change. For the |
(@madig I'm assuming you may PR this change?) |
I started something at fonttools/fonttools#2506 -- if that's ok to merge, I can expand the spec. |
That PR looks good to merge, but I'll let others chime in there. Thank you for doing the spec update! |
Leftover todo after merged #204:
|
According to https://docs.microsoft.com/en-gb/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN#naming-conventions,
the reserved file names are:
Should the spec be upated to contain only those? Note how "CLOCK$" and drive letters aren't mentioned (colons are replaced already anyway).
There's also https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/b04c3bd0-79dc-4e58-b8ed-74f19fc2ea0a. Not sure they should be reserved names as well?
The text was updated successfully, but these errors were encountered: