fix: (regression 0.51.2) some valid file names were not accepted
Massimo Melina committed
Feb 24, 2024 at 17:37 UTC
05971645e64f699548c6ecfa6a32a2e0d32d3788
1 file changed
+1
-1
src/util-files.ts
+1
-1
@@ -153,7 +153,7 @@ export function createFileWithPath(path: string, options?: Parameters<typeof cre
153
}
154
155
export function isValidFileName(name: string) {
156
- return !/^\.\.?$|[/:*?"<>|\\]/.test(name) && !dirTraversal(name)
156
+ return !/[/*?<>|\\]/.test(name) && !dirTraversal(name)
157
}
158
159
const FILE_ATTR_PREFIX = 'user.hfs.' // user. prefix to be linux compatible