console updater does not work if folder name contains spaces fix #3927
This commit is contained in:
parent
acfdc3cb88
commit
5310d022ce
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue