Skip to content

findFiles ignores 'base' part of exclude glob #52651

Open
@roblourens

Description

This searches for *.ts files and excludes .ts files in the second workspace folder.

vscode.workspace.findFiles('**/*.ts', new vscode.RelativePattern(vscode.workspace.workspaceFolders[1], '**/*.ts')).then(result => {
        console.log(result);
});

When I run this, I get 0 results, when it should return results from the first workspace folder.

Seems like it's always been that way. Is that intentional @bpasero? If not I can fix it. We can pass absolute exclude globs to search.

https://github.com/Microsoft/vscode/blob/b7e6e04666ca8dde560b69081c43365dce77d12a/src/vs/workbench/api/node/extHostWorkspace.ts#L357

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugconfirmedIssue has been confirmed by VS Code Team memberinfo-neededIssue requires more information from postersearchSearch widget and operation issues

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions