@@ -27,6 +27,7 @@ export type ResultDownloadedEvent = {
2727
2828export 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