mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix(code-index): align .rooignore filtering roots
This commit is contained in:
parent
2eec91087f
commit
90f010f59b
2 changed files with 4 additions and 2 deletions
|
|
@ -525,7 +525,7 @@ export class FileWatcher implements IFileWatcher {
|
|||
// Check if file should be ignored
|
||||
const relativeFilePath = generateRelativeFilePath(filePath, this.workspacePath)
|
||||
if (
|
||||
!this.ignoreController.validateAccess(filePath) ||
|
||||
!this.ignoreController.validateAccess(relativeFilePath) ||
|
||||
(this.ignoreInstance && this.ignoreInstance.ignores(relativeFilePath))
|
||||
) {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -86,7 +86,9 @@ export class DirectoryScanner implements IDirectoryScanner {
|
|||
// IMPORTANT: do not create a file watcher here (scan is short-lived).
|
||||
let allowedPaths: string[]
|
||||
{
|
||||
const ignoreController = new RooIgnoreController(directoryPath, { watch: false })
|
||||
// Root the controller at the effective workspace to ensure `.rooignore` checks
|
||||
// are consistent with other workspace-relative filtering.
|
||||
const ignoreController = new RooIgnoreController(scanWorkspace, { watch: false })
|
||||
try {
|
||||
await ignoreController.initialize()
|
||||
// Filter paths using .rooignore
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue