[IC] Fix non-existing file removal in CompilationTransaction
#KT-49785 In Progress
This commit is contained in:
committed by
Space Team
parent
82a2cac4d6
commit
bb51522cac
@@ -95,11 +95,12 @@ class RecoverableCompilationTransaction(
|
|||||||
* Moves the original [outputFile] to the [stashDir] instead of deleting.
|
* Moves the original [outputFile] to the [stashDir] instead of deleting.
|
||||||
*/
|
*/
|
||||||
override fun deleteFile(outputFile: Path) {
|
override fun deleteFile(outputFile: Path) {
|
||||||
|
if (!Files.exists(outputFile)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
if (isFileRelocationIsAlreadyRegisteredFor(outputFile)) {
|
if (isFileRelocationIsAlreadyRegisteredFor(outputFile)) {
|
||||||
if (Files.exists(outputFile)) {
|
reporter.debug { "Deleting $outputFile" }
|
||||||
reporter.debug { "Deleting $outputFile" }
|
Files.delete(outputFile)
|
||||||
Files.delete(outputFile)
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
reporter.measure(BuildTime.PRECISE_BACKUP_OUTPUT) {
|
reporter.measure(BuildTime.PRECISE_BACKUP_OUTPUT) {
|
||||||
|
|||||||
Reference in New Issue
Block a user