Skip to content

Commit c056686

Browse files
committed
Fixes #4869: Fix codebase indexing by correcting hidden directory filtering
The issue was in the isPathInIgnoredDirectory function where the '.*' pattern was incorrectly matching the current directory '.' in relative paths, causing ALL files to be ignored during codebase indexing. Changes: - Modified isPathInIgnoredDirectory to skip the current directory marker '.' - Added length check to ensure '.*' pattern only matches directories with actual names - Updated version to 3.21.0 This resolves the codebase indexing regression introduced in the directory filtering changes.
1 parent 2e2f83b commit c056686

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "%extension.displayName%",
44
"description": "%extension.description%",
55
"publisher": "RooVeterinaryInc",
6-
"version": "3.20.3",
6+
"version": "3.21.0",
77
"icon": "assets/icons/icon.png",
88
"galleryBanner": {
99
"color": "#617A91",

src/services/glob/ignore-utils.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ export function isPathInIgnoredDirectory(filePath: string): boolean {
1717
// Skip empty parts (from leading or trailing slashes)
1818
if (!part) continue
1919

20+
// Skip the current directory marker "."
21+
if (part === ".") continue
22+
2023
// Handle the ".*" pattern for hidden directories
21-
if (DIRS_TO_IGNORE.includes(".*") && part.startsWith(".") && part !== ".") {
24+
// Only match directories that start with "." and have more characters
25+
if (DIRS_TO_IGNORE.includes(".*") && part.startsWith(".") && part.length > 1) {
2226
return true
2327
}
2428

0 commit comments

Comments
 (0)