Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/services/code-index/processors/file-watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,12 @@ export class FileWatcher implements IFileWatcher {
*/
async processFile(filePath: string): Promise<FileProcessingResult> {
try {
// Calculate relative path for ignore checks
const relativeFilePath = generateRelativeFilePath(filePath, this.workspacePath)

// Check if file is in an ignored directory
if (isPathInIgnoredDirectory(filePath)) {
// Use relative path to avoid filtering out workspaces under hidden parent directories
if (isPathInIgnoredDirectory(relativeFilePath)) {
return {
path: filePath,
status: "skipped" as const,
Expand All @@ -518,7 +522,6 @@ export class FileWatcher implements IFileWatcher {
}

// Check if file should be ignored
const relativeFilePath = generateRelativeFilePath(filePath, this.workspacePath)
if (
!this.ignoreController.validateAccess(filePath) ||
(this.ignoreInstance && this.ignoreInstance.ignores(relativeFilePath))
Expand Down
3 changes: 2 additions & 1 deletion src/services/code-index/processors/scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ export class DirectoryScanner implements IDirectoryScanner {
const relativeFilePath = generateRelativeFilePath(filePath, scanWorkspace)

// Check if file is in an ignored directory using the shared helper
if (isPathInIgnoredDirectory(filePath)) {
// Use relative path to avoid filtering out workspaces under hidden parent directories
if (isPathInIgnoredDirectory(relativeFilePath)) {
return false
}

Expand Down