Skip to content

Commit

Permalink
fix: handle emplty gitignore line.
Browse files Browse the repository at this point in the history
  • Loading branch information
icycodes committed Jan 27, 2025
1 parent 82e1871 commit a983e99
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions clients/vscode/src/findFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ const gitIgnorePatternsMap = new Map<string, Set<string>>();

function gitIgnoreItemToExcludePatterns(item: string, prefix?: string | undefined): string[] {
let pattern = item.trim();
if (pattern.length === 0) {
return [];
}
if (pattern.indexOf("/") === -1 || pattern.indexOf("/") === pattern.length - 1) {
if (!pattern.startsWith("**/")) {
pattern = `**/${pattern}`;
Expand Down

0 comments on commit a983e99

Please sign in to comment.