@@ -74,7 +74,7 @@ class KotlinExtractorExtension(
74
74
// First, if we can find our log directory, then let's try
75
75
// making a log file there:
76
76
val extractorLogDir = System .getenv(" CODEQL_EXTRACTOR_JAVA_LOG_DIR" )
77
- if (extractorLogDir != null || extractorLogDir != " " ) {
77
+ if (extractorLogDir != null && extractorLogDir != " " ) {
78
78
// We use a slightly different filename pattern compared
79
79
// to normal logs. Just the existence of a `-top` log is
80
80
// a sign that something's gone very wrong.
@@ -296,7 +296,9 @@ private fun doFile(
296
296
context.clear()
297
297
}
298
298
299
- val dbSrcFilePath = Paths .get(" $dbSrcDir /$srcFilePath " )
299
+ val srcFileRelativePath = srcFilePath.replace(' :' , ' _' )
300
+
301
+ val dbSrcFilePath = Paths .get(" $dbSrcDir /$srcFileRelativePath " )
300
302
val dbSrcDirPath = dbSrcFilePath.parent
301
303
Files .createDirectories(dbSrcDirPath)
302
304
val srcTmpFile = File .createTempFile(dbSrcFilePath.fileName.toString() + " ." , " .src.tmp" , dbSrcDirPath.toFile())
@@ -305,7 +307,7 @@ private fun doFile(
305
307
}
306
308
srcTmpFile.renameTo(dbSrcFilePath.toFile())
307
309
308
- val trapFileName = " $dbTrapDir /$srcFilePath .trap"
310
+ val trapFileName = " $dbTrapDir /$srcFileRelativePath .trap"
309
311
val trapFileWriter = getTrapFileWriter(compression, logger, trapFileName)
310
312
311
313
if (checkTrapIdentical || ! trapFileWriter.exists()) {
0 commit comments