@@ -74,7 +74,7 @@ class KotlinExtractorExtension(
7474 // First, if we can find our log directory, then let's try
7575 // making a log file there:
7676 val extractorLogDir = System .getenv(" CODEQL_EXTRACTOR_JAVA_LOG_DIR" )
77- if (extractorLogDir != null || extractorLogDir != " " ) {
77+ if (extractorLogDir != null && extractorLogDir != " " ) {
7878 // We use a slightly different filename pattern compared
7979 // to normal logs. Just the existence of a `-top` log is
8080 // a sign that something's gone very wrong.
@@ -296,7 +296,9 @@ private fun doFile(
296296 context.clear()
297297 }
298298
299- val dbSrcFilePath = Paths .get(" $dbSrcDir /$srcFilePath " )
299+ val srcFileRelativePath = srcFilePath.replace(' :' , ' _' )
300+
301+ val dbSrcFilePath = Paths .get(" $dbSrcDir /$srcFileRelativePath " )
300302 val dbSrcDirPath = dbSrcFilePath.parent
301303 Files .createDirectories(dbSrcDirPath)
302304 val srcTmpFile = File .createTempFile(dbSrcFilePath.fileName.toString() + " ." , " .src.tmp" , dbSrcDirPath.toFile())
@@ -305,7 +307,7 @@ private fun doFile(
305307 }
306308 srcTmpFile.renameTo(dbSrcFilePath.toFile())
307309
308- val trapFileName = " $dbTrapDir /$srcFilePath .trap"
310+ val trapFileName = " $dbTrapDir /$srcFileRelativePath .trap"
309311 val trapFileWriter = getTrapFileWriter(compression, logger, trapFileName)
310312
311313 if (checkTrapIdentical || ! trapFileWriter.exists()) {
0 commit comments