Skip to content

Commit 57c9949

Browse files
committed
fixup! PoC download externally stored evaluator logs
1 parent 0763a9b commit 57c9949

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

extensions/ql-vscode/src/compare-performance/compare-performance-view.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export class ComparePerformanceView extends AbstractWebview<
184184
);
185185
await this.fetchAndUnzip(url, downloadPath, progress);
186186
}
187-
if (existsSync(logPath) && readdirSync(logPath).length >= 0) {
187+
if (existsSync(logPath) && readdirSync(logPath).length > 0) {
188188
void extLogger.log(
189189
`Skipping log extraction to existing '${logPath}'...`,
190190
);
@@ -226,6 +226,10 @@ export class ComparePerformanceView extends AbstractWebview<
226226
return;
227227
}
228228

229+
/**
230+
* XXX Almost identical copy of the one in `database-fetcher.ts`.
231+
* There ought to be a generic `downloadArtifactOrSimilar`
232+
*/
229233
private async fetchAndUnzip(
230234
contentUrl: string,
231235
// (see below) requestHeaders: { [key: string]: string },
@@ -381,6 +385,7 @@ export class ComparePerformanceView extends AbstractWebview<
381385
});
382386
execFileSync("unzip", ["-q", "-d", unzipPath, zipFile]);
383387
}
388+
384389
private async untargz(
385390
tarballPath: string,
386391
untarPath: string,

0 commit comments

Comments
 (0)