Throw exception with invalid characters
allejo opened this issue · comments
Following up on #188 (comment), I propose we implement a blacklist of characters.
For example, /
is now blacklisted after #188. But the :
character is also invalid on macOS and Windows, not sure about Linux.
Are there any other characters that we should disallow in filenames and directory names?
I'm unsure about this. If we go down that route we might have to think about whether we want to disallow certain file extensions that are forbidden on Windows. Where would we draw the line on what is allowed and what isn't?
If things were changed to accept a configuration object (or array), the idea of a blacklist could be part of the config - entirely dictated by the user. You could also use the idea of a config to set the directory separator, case-sensitivity, etc.