Do not exclude whole project dir when listing in case where project i… #573
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…s places inside excluded dir (like /tmp or ~/tmp)
While doing some testing reasoning I noticed that model gets confused by information that working directory is empty, yet file inside is open. I found that this was caused by putting my test project in /tmp.
Current logic tries to exclude “noise” files inside project, but the glob used does not take into consideration working directory. In case project was inside excluded directory name it would always exclude everything.
This simple PR fix that by appending working dir to exclusion glob to limit it to names inside project directory.
Description
Type of change
How Has This Been Tested?
Create new project inside one of excluded directories like
/tmp
and confirm api request Current Working Directory Files section to contain correct listing.Checklist:
Additional context
Related Issues
Reviewers
Important
Fixes exclusion pattern in
listFiles()
to prevent entire project directories from being excluded when located inside ignored directories.listFiles()
inlist-files.ts
where projects inside excluded directories (e.g.,/tmp
) were entirely excluded.dirPath
, ensuring only specific subdirectories are ignored.This description was created by for 048863e. It will automatically update as commits are pushed.