mirror of
https://github.com/gotson/komga.git
synced 2025-12-06 08:32:25 +01:00
fix: more robust process handling for kepubify
This commit is contained in:
parent
62d193db38
commit
48e6eaf41d
1 changed files with 8 additions and 1 deletions
|
|
@ -137,7 +137,14 @@ class KepubConverter(
|
|||
destinationPath.toString(),
|
||||
)
|
||||
logger.debug { "Starting conversion with: ${command.joinToString(" ")}" }
|
||||
val process = Runtime.getRuntime().exec(command)
|
||||
val process =
|
||||
try {
|
||||
Runtime.getRuntime().exec(command)
|
||||
} catch (e: Exception) {
|
||||
logger.error(e) { "Failed to create process" }
|
||||
return null
|
||||
}
|
||||
|
||||
if (!process.waitFor(10, TimeUnit.SECONDS)) {
|
||||
logger.error { "Kepub conversion timeout. Command: ${command.joinToString(" ")}" }
|
||||
return null
|
||||
|
|
|
|||
Loading…
Reference in a new issue