@@ -10,7 +10,7 @@ import {
1010 remove ,
1111 writeFileSync ,
1212} from "fs-extra" ;
13- import path , { basename , dirname , join } from "path" ;
13+ import { basename , dirname , join , relative } from "path" ;
1414import { Uri , window , workspace } from "vscode" ;
1515import type { CodeQLCliServer } from "../codeql-cli/cli" ;
1616import type { App } from "../common/app" ;
@@ -119,7 +119,7 @@ export class RemoteLogs {
119119 logArtifact : ArtifactDownload ,
120120 ) : Promise < string /* log path */ | undefined > {
121121 const artifactDownloadUrl = await this . getArtifactDownloadUrl ( logArtifact ) ;
122- const logsPath = path . join (
122+ const logsPath = join (
123123 this . workingDirectory ,
124124 `logs-of/${ artifactDownloadUrl . id } ` ,
125125 ) ;
@@ -171,7 +171,7 @@ export class RemoteLogs {
171171 ) } `,
172172 ) ;
173173 }
174- const rawEvaluatorLog = path . join ( logsDirectory , firstFileInDir ) ;
174+ const rawEvaluatorLog = join ( logsDirectory , firstFileInDir ) ;
175175 if ( rawEvaluatorLog !== logsPathDirStructure . evalLogPath ) {
176176 // rename the json file to the standard name
177177 await move ( rawEvaluatorLog , logsPathDirStructure . evalLogPath ) ;
@@ -199,10 +199,7 @@ export class RemoteLogs {
199199 progress : ProgressCallback ,
200200 ) {
201201 const { url, bytes, id : artifactDiskId } = artifactDownloadUrl ;
202- const artifactDownloadPath = path . join (
203- this . workingDirectory ,
204- artifactDiskId ,
205- ) ;
202+ const artifactDownloadPath = join ( this . workingDirectory , artifactDiskId ) ;
206203 if (
207204 existsSync ( artifactDownloadPath ) &&
208205 readdirSync ( artifactDownloadPath ) . length > 0
@@ -251,7 +248,7 @@ export class RemoteLogs {
251248 }
252249 try {
253250 await this . untargz (
254- path . join ( artifactDownloadPath , tarGzFiles [ 0 ] ) ,
251+ join ( artifactDownloadPath , tarGzFiles [ 0 ] ) ,
255252 logsDir ,
256253 progress ,
257254 ) ;
@@ -487,8 +484,8 @@ export class RemoteLogs {
487484 ) ;
488485 }
489486 return {
490- bin : path . join ( dcaDir , "dca" ) ,
491- config : path . join ( dcaDir , "dca-config.yml" ) ,
487+ bin : join ( dcaDir , "dca" ) ,
488+ config : join ( dcaDir , "dca-config.yml" ) ,
492489 } ;
493490 }
494491
@@ -515,7 +512,7 @@ export class RemoteLogs {
515512 const downloadsFile = join (
516513 this . workingDirectory ,
517514 "downloads-of" ,
518- path . relative ( this . workingDirectory , tasksDir ) ,
515+ relative ( this . workingDirectory , tasksDir ) ,
519516 "downloads.json" ,
520517 ) ;
521518 if ( existsSync ( downloadsFile ) ) {
@@ -575,7 +572,7 @@ export class RemoteLogs {
575572 ) ;
576573 }
577574 const tasksSha = tasksResponse . data . sha ;
578- const baseTasksDir = path . join ( this . workingDirectory , "tasks" ) ;
575+ const baseTasksDir = join ( this . workingDirectory , "tasks" ) ;
579576 const tasksDir = join ( baseTasksDir , tasksSha ) ;
580577 if ( existsSync ( tasksDir ) && readdirSync ( tasksDir ) . length > 0 ) {
581578 void extLogger . log ( `Skipping download to existing '${ tasksDir } '...` ) ;
0 commit comments