Skip to content

Commit

Permalink
Unbreak the build
Browse files Browse the repository at this point in the history
For some reason, BestEffortTastyWriter does not compile since PlainFile does not have a delete
method, only File does.
  • Loading branch information
odersky committed May 7, 2024
1 parent 44c1e3a commit 7641a94
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ object BestEffortTastyWriter:
unit.pickled.foreach { (clz, binary) =>
val parts = clz.fullName.mangledString.split('.')
val outPath = outputPath(parts.toList, dir)
val outTastyFile = new PlainFile(new File(outPath))
val file = new File(outPath)
val outTastyFile = new PlainFile(file)
val outstream = new DataOutputStream(outTastyFile.bufferedOutput)
try outstream.write(binary())
catch case ex: ClosedByInterruptException =>
try
outTastyFile.delete() // don't leave an empty or half-written tastyfile around after an interrupt
file.delete() // don't leave an empty or half-written tastyfile around after an interrupt
catch
case _: Throwable =>
throw ex
Expand Down

0 comments on commit 7641a94

Please sign in to comment.