From 0e9c05db08dc1265bbb4736c44e82cc122351d3b Mon Sep 17 00:00:00 2001 From: Jan Burzinski <156842394+janburzinski@users.noreply.github.com> Date: Sun, 28 Jun 2026 08:34:44 +0200 Subject: [PATCH] fix(app): use file URLs for app protocol assets --- apps/emdash-desktop/src/main/app/protocol.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/emdash-desktop/src/main/app/protocol.ts b/apps/emdash-desktop/src/main/app/protocol.ts index a4776dc1a4..ce3f615de1 100644 --- a/apps/emdash-desktop/src/main/app/protocol.ts +++ b/apps/emdash-desktop/src/main/app/protocol.ts @@ -1,4 +1,5 @@ import { join, normalize, sep } from 'node:path'; +import { pathToFileURL } from 'node:url'; import { net, protocol } from 'electron'; import { APP_NAME_LOWER } from '@shared/app-identity'; @@ -32,9 +33,9 @@ export function setupAppProtocol(rendererRoot: string): void { } try { - return await net.fetch(`file://${resolved}`); + return await net.fetch(pathToFileURL(resolved).href); } catch { - return net.fetch(`file://${join(root, 'index.html')}`); + return net.fetch(pathToFileURL(join(root, 'index.html')).href); } }); }