vfsStream icon indicating copy to clipboard operation
vfsStream copied to clipboard

Throw exception with invalid characters

Open allejo opened this issue 4 years ago • 2 comments

Following up on https://github.com/bovigo/vfsStream/pull/188#issuecomment-485628718, 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?

allejo avatar Jul 23 '19 00:07 allejo

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?

mikey179 avatar Jul 26 '19 10:07 mikey179

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.

bizurkur avatar Sep 27 '19 04:09 bizurkur