mirror of
https://github.com/DanielSWolf/rhubarb-lip-sync.git
synced 2026-11-21 12:25:08 +00:00
Fixed race condition when deleting temporary files
This commit is contained in:
@@ -44,7 +44,8 @@ class RhubarbTask(
|
||||
val message = parseJsonObject(line)
|
||||
when (message.string("type")!!) {
|
||||
"progress" -> {
|
||||
reportProgress(message.double("value")!!)}
|
||||
reportProgress(message.double("value")!!)
|
||||
}
|
||||
"success" -> {
|
||||
reportProgress(1.0)
|
||||
val resultString = String(Files.readAllBytes(outputFile.filePath), StandardCharsets.UTF_8)
|
||||
@@ -60,6 +61,8 @@ class RhubarbTask(
|
||||
throw e
|
||||
} catch (e: EOFException) {
|
||||
throw Exception("Rhubarb terminated unexpectedly.")
|
||||
} finally {
|
||||
process.waitFor();
|
||||
}
|
||||
}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user