🐛 fix bug causing git root not to be indexed
This commit is contained in:
parent
cc139070b1
commit
38c8bcab59
3 changed files with 8 additions and 3 deletions
|
|
@ -359,7 +359,7 @@ class IdeProtocolClient {
|
|||
gitRoot || directory,
|
||||
[],
|
||||
true,
|
||||
onlyThisDirectory
|
||||
gitRoot === directory ? undefined : onlyThisDirectory
|
||||
)) {
|
||||
allFiles.push(file);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,12 @@ class VsCodeIde implements IDE {
|
|||
|
||||
const workspaceDirs = await this.getWorkspaceDirs();
|
||||
for (const directory of workspaceDirs) {
|
||||
for await (const dir of traverseDirectory(directory, [], false)) {
|
||||
for await (const dir of traverseDirectory(
|
||||
directory,
|
||||
[],
|
||||
false,
|
||||
undefined
|
||||
)) {
|
||||
allDirs.push(dir);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ export async function* traverseDirectory(
|
|||
directory: string,
|
||||
gitIgnorePatterns: string[],
|
||||
returnFiles: boolean = true,
|
||||
onlyThisDirectory?: string[]
|
||||
onlyThisDirectory: string[] | undefined
|
||||
): AsyncGenerator<string> {
|
||||
const nodes = await vscode.workspace.fs.readDirectory(
|
||||
uriFromFilePath(directory)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue