From 92ed8e20c99f021a543f87e13fc6448f138699c6 Mon Sep 17 00:00:00 2001 From: Kendall Garner <17521368+kgarner7@users.noreply.github.com> Date: Sat, 12 Jul 2025 07:21:34 -0700 Subject: [PATCH] fix custom path --- .../settings/components/general/application-settings.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/renderer/features/settings/components/general/application-settings.tsx b/src/renderer/features/settings/components/general/application-settings.tsx index 5ef8d815..20039d1d 100644 --- a/src/renderer/features/settings/components/general/application-settings.tsx +++ b/src/renderer/features/settings/components/general/application-settings.tsx @@ -22,6 +22,8 @@ import { FontType } from '/@/shared/types/types'; const localSettings = isElectron() ? window.api.localSettings : null; const ipc = isElectron() ? window.api.ipc : null; +// Electron 32+ removed file.path, use this which is exposed in preload to get real path +const webUtils = isElectron() ? window.electron.webUtils : null; type Font = { label: string; @@ -254,7 +256,7 @@ export const ApplicationSettings = () => { setSettings({ font: { ...fontSettings, - custom: e?.path ?? null, + custom: e ? webUtils?.getPathForFile(e) || null : null, }, }) }