Skip to content

Commit

Permalink
Maybe set the executable like this?
Browse files Browse the repository at this point in the history
  • Loading branch information
BluSpring committed Oct 6, 2024
1 parent e103bf8 commit bfee7db
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,10 @@ class LocalLibreTranslateInstance private constructor(val process: Process, val

clearDeadDirectories()

if (!source.canExecute()) {
if (!source.setExecutable(true)) {
UnityTranslate.logger.error("Unable to start local LibreTranslate instance! You may have to manually set the execute permission on the file yourself!")
UnityTranslate.logger.error("File path: ${source.absolutePath}")
return
}
if (!source.setExecutable(true, false) && !source.canExecute()) {
UnityTranslate.logger.error("Unable to start local LibreTranslate instance! You may have to manually set the execute permission on the file yourself!")
UnityTranslate.logger.error("File path: ${source.absolutePath}")
return
}

val processBuilder = ProcessBuilder(listOf(
Expand Down

0 comments on commit bfee7db

Please sign in to comment.