Exclude src archives and other non-normal workspace folders

This commit is contained in:
Robert
2023-05-22 10:42:47 +01:00
parent 935c9b996f
commit 78f11397e2

View File

@@ -12,6 +12,7 @@ import {
import { MultiFileSystemWatcher } from "../common/vscode/multi-file-system-watcher";
import { App } from "../common/app";
import { FileTreeDirectory, FileTreeLeaf } from "../common/file-tree-nodes";
import { getOnDiskWorkspaceFolders } from "../helpers";
/**
* The results of discovering queries.
@@ -121,7 +122,10 @@ export class QueryDiscovery extends Discovery<QueryDiscoveryResults> {
const name = workspaceFolder.name;
// Don't try discovery on workspace folders that don't exist on the filesystem
if (!(await pathExists(fullPath))) {
if (
!(await pathExists(fullPath)) ||
!getOnDiskWorkspaceFolders().includes(fullPath)
) {
return undefined;
}