staticSearch icon indicating copy to clipboard operation
staticSearch copied to clipboard

How to handle reserved filenames in Windows?

Open joeytakeda opened this issue 2 years ago • 1 comments

We now have Windows support (#250 and #33), but we will need to handle reserved filenames in Windows. As @martindholmes wrote:

List of reserved windows filenames:

CON, PRN, AUX, NUL COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9 LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9

If files called e.g. "con.json" are created, they can't be deleted by an ordinary user. No idea what we might do here, other than add these things to the stopword list if you're building on Windows.

joeytakeda avatar Jan 25 '23 18:01 joeytakeda

I think we could silently add ones with numerals to the stopword list at build time, since they're not really words, but the first four might require an explicit warning.

martindholmes avatar Jan 25 '23 21:01 martindholmes