Skip to content

Commit d5ed25f

Browse files
committed
Add comment around files being in the same workspace folder
1 parent 8179476 commit d5ed25f

File tree

1 file changed

+3
-0
lines changed
  • extensions/ql-vscode/src/variant-analysis

1 file changed

+3
-0
lines changed

extensions/ql-vscode/src/variant-analysis/ql.ts

+3
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ function findQlPackRootForQueriesWithNoPack(
6464
): string {
6565
const commonParentDir = findCommonParentDir(...queryFiles);
6666

67+
// Check that all queries are in a workspace folder (the same one),
68+
// so that we don't return a pack root that's outside the workspace.
69+
// This is to avoid accessing files outside the workspace folders.
6770
for (const workspaceFolder of workspaceFolders) {
6871
if (containsPath(workspaceFolder, commonParentDir)) {
6972
return commonParentDir;

0 commit comments

Comments
 (0)