We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
There is should be something like this 'images/my-photo(1).jpg', isn't it? https://github.com/jonschlinkert/is-valid-path/blob/master/test.js#L15-L20
I think it's correct filename
The text was updated successfully, but these errors were encountered:
I have the same issue. Parentheses are incorrectly considered invalid.
Sorry, something went wrong.
I quickly wrote this function to test paths. I guess it can be better, but it is just a quick fix to solve this problem in our code
export function isValidPath(pathName: string) { try { const resolvedPath = resolve(pathName) if (resolvedPath) { if (process.platform === 'win32') { if (pathName.length > 4 && pathName[2] === '?' && pathName[0] === '\\' && pathName[1] === '\\' && pathName[3] === '\\') { pathName = pathName.substring(4) } if (pathName.length > 2 && pathName[1] === ':' && pathName[2] === '\\') { pathName = pathName.substring(2) } return !/[<>:"|?*]/.test(pathName) } return true } } catch(_e: unknown) { } return false }
No branches or pull requests
There is should be something like this 'images/my-photo(1).jpg', isn't it? https://github.com/jonschlinkert/is-valid-path/blob/master/test.js#L15-L20
I think it's correct filename
The text was updated successfully, but these errors were encountered: