diff --git a/src/main/ipc_firmware.js b/src/main/ipc_firmware.js index adc447d66..497877899 100644 --- a/src/main/ipc_firmware.js +++ b/src/main/ipc_firmware.js @@ -277,4 +277,8 @@ export const registerFirmwareHandlers = () => { event.returnValue = buildInfo.version.match(/[^+]*/)[0]; }); + + ipcMain.on("firmware.get-base-directory", (event) => { + event.returnValue = getFirmwareBaseDirectory(); + }); }; diff --git a/src/renderer/screens/FirmwareUpdate.js b/src/renderer/screens/FirmwareUpdate.js index a6c4fba79..722f5e632 100644 --- a/src/renderer/screens/FirmwareUpdate.js +++ b/src/renderer/screens/FirmwareUpdate.js @@ -79,8 +79,11 @@ const FirmwareUpdate = (props) => { const firmwareType = focusDeviceDescriptor.info.firmwareType || "hex"; const cVendor = vendor.replace("/", ""), cProduct = product.replace("/", ""); - return getFilesystemPathForStaticAsset( - path.join(cVendor, cProduct, "default." + firmwareType) + return path.join( + ipcRenderer.sendSync("firmware.get-base-directory"), + cVendor, + cProduct, + "default." + firmwareType ); }; const _flash = async (options, steps) => {