Skip to content

Commit 32579e9

Browse files
authored
Fix explorer.excludeGitIgnore exclusion bug (microsoft#160611)
fix gitignore exclusion
1 parent 29ba38e commit 32579e9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/vs/workbench/services/search/common/ignoreFile.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,13 @@ export class IgnoreFile {
133133
line = '**/' + line;
134134
} else {
135135
if (firstSep === 0) {
136-
line = line.slice(1);
136+
if (dirPath.slice(-1) === '/') {
137+
line = line.slice(1);
138+
}
139+
} else {
140+
if (dirPath.slice(-1) !== '/') {
141+
line = '/' + line;
142+
}
137143
}
138144
line = dirPath + line;
139145
}

0 commit comments

Comments
 (0)