This repository was archived by the owner on May 15, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
src/services/code-index/processors Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -508,8 +508,12 @@ export class FileWatcher implements IFileWatcher {
508508 */
509509 async processFile ( filePath : string ) : Promise < FileProcessingResult > {
510510 try {
511+ // Get relative path for ignore checks
512+ const relativeFilePath = generateRelativeFilePath ( filePath , this . workspacePath )
513+
511514 // Check if file is in an ignored directory
512- if ( isPathInIgnoredDirectory ( filePath ) ) {
515+ // Use relative path to avoid matching parent directories outside the workspace
516+ if ( isPathInIgnoredDirectory ( relativeFilePath ) ) {
513517 return {
514518 path : filePath ,
515519 status : "skipped" as const ,
@@ -518,7 +522,6 @@ export class FileWatcher implements IFileWatcher {
518522 }
519523
520524 // Check if file should be ignored
521- const relativeFilePath = generateRelativeFilePath ( filePath , this . workspacePath )
522525 if (
523526 ! this . ignoreController . validateAccess ( filePath ) ||
524527 ( this . ignoreInstance && this . ignoreInstance . ignores ( relativeFilePath ) )
Original file line number Diff line number Diff line change @@ -96,7 +96,8 @@ export class DirectoryScanner implements IDirectoryScanner {
9696 const relativeFilePath = generateRelativeFilePath ( filePath , scanWorkspace )
9797
9898 // Check if file is in an ignored directory using the shared helper
99- if ( isPathInIgnoredDirectory ( filePath ) ) {
99+ // Use relative path to avoid matching parent directories outside the workspace
100+ if ( isPathInIgnoredDirectory ( relativeFilePath ) ) {
100101 return false
101102 }
102103
You can’t perform that action at this time.
0 commit comments