@@ -8,7 +8,8 @@ import { type CodeQL } from "./codeql";
88import { type Config } from "./config-utils" ;
99import { getFileOidsUnderPath } from "./git-utils" ;
1010import { Logger } from "./logging" ;
11- import { isInTestMode , withTimeout } from "./util" ;
11+ import { getCodeQLDatabasePath , isInTestMode , withTimeout } from "./util" ;
12+ import { Language } from "./languages" ;
1213
1314export enum OverlayDatabaseMode {
1415 Overlay = "overlay" ,
@@ -68,7 +69,7 @@ async function readBaseDatabaseOidsFile(
6869}
6970
7071function getBaseDatabaseOidsFilePath ( config : Config ) : string {
71- return path . join ( config . dbLocation , "base-database-oids.json" ) ;
72+ return path . join ( config . dbLocation , "java" , " base-database-oids.json") ;
7273}
7374
7475/**
@@ -203,7 +204,7 @@ export async function uploadOverlayBaseDatabaseToCache(
203204 return false ;
204205 }
205206
206- const dbLocation = config . dbLocation ;
207+ const dbLocation = getCodeQLDatabasePath ( config , Language . java ) ;
207208 const cacheKey = generateCacheKey ( ( await codeql . getVersion ( ) ) . version ) ;
208209 logger . info (
209210 `Uploading overlay-base database to Actions cache with key ${ cacheKey } ` ,
@@ -267,7 +268,7 @@ export async function downloadOverlayBaseDatabaseFromCache(
267268 return false ;
268269 }
269270
270- const dbLocation = config . dbLocation ;
271+ const dbLocation = getCodeQLDatabasePath ( config , Language . java ) ;
271272 const codeQlVersion = ( await codeql . getVersion ( ) ) . version ;
272273 const restoreKey = getCacheRestoreKey ( codeQlVersion ) ;
273274
@@ -329,5 +330,5 @@ function getCacheRestoreKey(codeQlVersion: string): string {
329330 // we are analyzing. However, since overlay-base databases are built from the
330331 // default branch and used in PR analysis, it is exceedingly unlikely that
331332 // the commit SHA will ever be the same, so we can just leave it out.
332- return `${ CACHE_PREFIX } -${ CACHE_VERSION } -${ codeQlVersion } -` ;
333+ return `${ CACHE_PREFIX } -${ CACHE_VERSION } -${ codeQlVersion } -java- ` ;
333334}
0 commit comments