projectEndings / staticSearch

A codebase to support a pure JSON search engine requiring no backend for any XHTML5 document collection
https://endings.uvic.ca/staticSearch/docs/index.html
Mozilla Public License 2.0
50 stars 22 forks source link

How to handle reserved filenames in Windows? #262

Open joeytakeda opened 1 year ago

joeytakeda commented 1 year ago

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.

martindholmes commented 1 year ago

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.