mirror of
https://github.com/github/codeql.git
synced 2026-05-04 13:15:21 +02:00
Do not delete temp TRAP files when file level exception is caught
This commit is contained in:
@@ -66,8 +66,7 @@ class ExternalClassExtractor(val logger: FileLogger, val invocationTrapFile: Str
|
||||
|
||||
} catch (e: Exception) {
|
||||
manager.setHasError()
|
||||
trapTmpFile.delete()
|
||||
logger.error("Failed to extract '$binaryPath'", e)
|
||||
logger.error("Failed to extract '$binaryPath'. Partial TRAP file location is $trapTmpFile", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,10 +151,7 @@ fun doFile(invocationTrapFile: String,
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
logger.error("Failed to extract '$srcFilePath'", e)
|
||||
if (!trapTmpFile.delete()) {
|
||||
logger.warn(Severity.WarnLow, "Failed to delete $trapTmpFile")
|
||||
}
|
||||
logger.error("Failed to extract '$srcFilePath'. Partial TRAP file location is $trapTmpFile", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user