diff --git a/firmware/CHANGELOG.md b/firmware/CHANGELOG.md index dd31dbb5fe..8c93799896 100644 --- a/firmware/CHANGELOG.md +++ b/firmware/CHANGELOG.md @@ -31,7 +31,8 @@ All notable user-facing or behavior-altering changes will be documented in this ### Fixed - SD card logging with SDIO hardware #3873 - - rusEFI console stability improvement #3912 + - rusEFI console stability improvement #3912 + - console updater does not work if folder name contains spaces #3927 ## Removed - Miata NB1 trigger was merged with Miata NB2 trigger diff --git a/java_console/ui/src/main/java/com/rusefi/maintenance/DfuFlasher.java b/java_console/ui/src/main/java/com/rusefi/maintenance/DfuFlasher.java index 1182d6408c..ed8ae41388 100644 --- a/java_console/ui/src/main/java/com/rusefi/maintenance/DfuFlasher.java +++ b/java_console/ui/src/main/java/com/rusefi/maintenance/DfuFlasher.java @@ -178,11 +178,16 @@ public class DfuFlasher { String hexFileName = IniFileModel.findFile(Launcher.INPUT_FILES_PATH, prefix, suffix); if (hexFileName == null) throw new FileNotFoundException("File not found " + prefix + "*" + suffix); - String hexAbsolutePath = new File(hexFileName).getAbsolutePath(); + // we need quotes in case if absolute path contains spaces + String hexAbsolutePath = quote(new File(hexFileName).getAbsolutePath()); return DFU_BINARY_LOCATION + "/" + DFU_BINARY + " -c port=usb1 -w " + hexAbsolutePath + " -v -s"; } + private static String quote(String absolutePath) { + return "\"" + absolutePath + "\""; + } + private static String getDfuEraseCommand() { return DFU_BINARY_LOCATION + "/" + DFU_BINARY + " -c port=usb1 -e all"; }