Skip to content

Commit 72a8022

Browse files
committed
PR fix
1 parent a693ffd commit 72a8022

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/glob/list-files.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ function isIgnoredByGitignore(dirName: string, gitignorePatterns: string[]): boo
297297
}
298298
// Wildcard patterns
299299
else if (pattern.includes("*")) {
300-
const regexPattern = pattern.replace(/\./g, "\\.").replace(/\*/g, ".*")
300+
const regexPattern = pattern.replace(/\\/g, "\\\\").replace(/\./g, "\\.").replace(/\*/g, ".*")
301301
const regex = new RegExp(`^${regexPattern}$`)
302302
if (regex.test(dirName)) {
303303
return true

0 commit comments

Comments
 (0)