Skip to content

Commit

Permalink
Revert a bug introduced in the previous release of Chrysalis that broke
Browse files Browse the repository at this point in the history
the ability to automatically download new firmware updates
  • Loading branch information
obra committed Dec 18, 2023
1 parent bc113f6 commit 038b684
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/main/ipc_firmware.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,4 +277,8 @@ export const registerFirmwareHandlers = () => {

event.returnValue = buildInfo.version.match(/[^+]*/)[0];
});

ipcMain.on("firmware.get-base-directory", (event) => {
event.returnValue = getFirmwareBaseDirectory();
});
};
7 changes: 5 additions & 2 deletions src/renderer/screens/FirmwareUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 038b684

Please sign in to comment.