fix: images not loading with local protocol

This commit is contained in:
Zamitto 2024-06-19 23:01:16 -03:00
parent 884ba47b9b
commit 6b31586734

View file

@ -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();