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
On Windows, paths with brackets [ ] in them cause brackets library to error out #699
Comments
|
If the file paths actually have brackets in them and you're not otherwise trying to use glob patterns then you can use |
@es128 that does fix it... I'm curious though, because watching |
Yes, it is, but you don't need that. Just watch the directory and chokidar will recursively traverse through everything within it for you. If you do want to use glob patterns that are more specific you need to make sure you only use forward slashes as path separators and you would need to provide your own escaping of the special glob-relevant characters that are part of the actual file path like |
This isn't a problem with input to the library--filenames (that is, the names of files existing on the filesystem chokidar is being instructed to watch) with square brackets in them cause the issue, not offending glob patterns. In particular, filenames matching the regex |
That looks like an invalid glob pattern. Glob patterns may only have forward slashes as path separators. See https://github.com/micromatch/micromatch#backslashes. Also, fwiw unless you are only tring to match dotfiles inside and outside the brackets, the |
It is an invalid glob pattern, yes, because it is the name of a file on the filesystem created by someone else over which I have no control. The glob pattern I'm supplying to chokidar is this: To put this another way: If, on on my hard drive, there exists a file with a path like Looking into chokidar's code, it seems that file names obtained from the file system must be getting passed through the |
see paulmillr/chokidar#699 for more info. ended up disabling the globbings because we're not really using them.
see paulmillr/chokidar#699 for more info. ended up disabling the globbings because we're not really using them.
see paulmillr/chokidar#699 for more info. ended up disabling the globbings because we're not really using them.
Watching a path of
[routes]/[page].html
causes:This does not occur in chokidar@1.7
sveltejs/sapper#212
The text was updated successfully, but these errors were encountered: