Skip to content

Commit 95cbe02

Browse files
committed
Use unzipped file path for loading results
1 parent e73a687 commit 95cbe02

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

extensions/ql-vscode/src/remote-queries/variant-analysis-results-manager.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export type ResultDownloadedEvent = {
2727

2828
export class VariantAnalysisResultsManager extends DisposableObject {
2929
private static readonly REPO_TASK_FILENAME = 'repo_task.json';
30+
private static readonly RESULTS_DIRECTORY = 'results';
3031

3132
private readonly cachedResults: Map<CacheKey, VariantAnalysisScannedRepositoryResult>;
3233

@@ -68,7 +69,7 @@ export class VariantAnalysisResultsManager extends DisposableObject {
6869
await fs.outputJson(path.join(resultDirectory, VariantAnalysisResultsManager.REPO_TASK_FILENAME), repoTask);
6970

7071
const zipFilePath = path.join(resultDirectory, 'results.zip');
71-
const unzippedFilesDirectory = path.join(resultDirectory, 'results');
72+
const unzippedFilesDirectory = path.join(resultDirectory, VariantAnalysisResultsManager.RESULTS_DIRECTORY);
7273

7374
fs.writeFileSync(zipFilePath, Buffer.from(result));
7475
await unzipFile(zipFilePath, unzippedFilesDirectory);
@@ -116,8 +117,9 @@ export class VariantAnalysisResultsManager extends DisposableObject {
116117

117118
const fileLinkPrefix = this.createGitHubDotcomFileLinkPrefix(repoTask.repository.full_name, repoTask.database_commit_sha);
118119

119-
const sarifPath = path.join(storageDirectory, 'results.sarif');
120-
const bqrsPath = path.join(storageDirectory, 'results.bqrs');
120+
const resultsDirectory = path.join(storageDirectory, VariantAnalysisResultsManager.RESULTS_DIRECTORY);
121+
const sarifPath = path.join(resultsDirectory, 'results.sarif');
122+
const bqrsPath = path.join(resultsDirectory, 'results.bqrs');
121123
if (await fs.pathExists(sarifPath)) {
122124
const interpretedResults = await this.readSarifResults(sarifPath, fileLinkPrefix);
123125

0 commit comments

Comments
 (0)