From 6b3158673476ec929cd2e9179afce5218220b614 Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Wed, 19 Jun 2024 23:01:16 -0300 Subject: [PATCH] fix: images not loading with local protocol --- src/main/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index 10399beb..760b8283 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -53,8 +53,8 @@ app.whenReady().then(async () => { electronApp.setAppUserModelId("site.hydralauncher.hydra"); protocol.handle("local", (request) => { - const filePath = request.url.slice("local://".length); - return net.fetch(url.pathToFileURL(filePath).toString()); + const filePath = request.url.slice("local:".length); + return net.fetch(url.pathToFileURL(decodeURI(filePath)).toString()); }); await dataSource.initialize();