diff --git a/java_console/io/src/main/java/com/rusefi/SimulatorExecHelper.java b/java_console/io/src/main/java/com/rusefi/SimulatorExecHelper.java index 9b00e3dbe1..666d0093f2 100644 --- a/java_console/io/src/main/java/com/rusefi/SimulatorExecHelper.java +++ b/java_console/io/src/main/java/com/rusefi/SimulatorExecHelper.java @@ -107,11 +107,13 @@ private static File getSimulatorBinary() { public static File getSimulatorBinary(String binaryPath) { File binary = new File(binaryPath); - if (!binary.exists()) // try also for Windows/PE executable + if (!binary.exists()) { // try also for Windows/PE executable binary = new File(binaryPath + ".exe"); + } - if (!binary.exists() || binary.isDirectory() || !binary.canExecute()) + if (!binary.exists() || binary.isDirectory() || !binary.canExecute()) { throw new IllegalStateException("FOME Simulator program not found"); + } return binary; }