console updater does not work if folder name contains spaces fix #3927
This commit is contained in:
parent
acfdc3cb88
commit
5310d022ce
|
@ -32,6 +32,7 @@ All notable user-facing or behavior-altering changes will be documented in this
|
||||||
### Fixed
|
### Fixed
|
||||||
- SD card logging with SDIO hardware #3873
|
- 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
|
## Removed
|
||||||
- Miata NB1 trigger was merged with Miata NB2 trigger
|
- Miata NB1 trigger was merged with Miata NB2 trigger
|
||||||
|
|
|
@ -178,11 +178,16 @@ public class DfuFlasher {
|
||||||
String hexFileName = IniFileModel.findFile(Launcher.INPUT_FILES_PATH, prefix, suffix);
|
String hexFileName = IniFileModel.findFile(Launcher.INPUT_FILES_PATH, prefix, suffix);
|
||||||
if (hexFileName == null)
|
if (hexFileName == null)
|
||||||
throw new FileNotFoundException("File not found " + prefix + "*" + suffix);
|
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";
|
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() {
|
private static String getDfuEraseCommand() {
|
||||||
return DFU_BINARY_LOCATION + "/" + DFU_BINARY + " -c port=usb1 -e all";
|
return DFU_BINARY_LOCATION + "/" + DFU_BINARY + " -c port=usb1 -e all";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue