From b9076d01af583572aa914968994b2c6e05f9c88c Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Wed, 9 Sep 2020 17:06:04 +0200 Subject: [PATCH] Fix content not loading when the app path contains special characters Changelog-entry: Fix content not loading when the app path contains special characters Change-type: patch --- lib/gui/etcher.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/gui/etcher.ts b/lib/gui/etcher.ts index 59163bad..36282fd4 100644 --- a/lib/gui/etcher.ts +++ b/lib/gui/etcher.ts @@ -174,7 +174,13 @@ async function createMainWindow() { event.preventDefault(); }); - mainWindow.loadURL(`file://${path.join(__dirname, 'index.html')}`); + mainWindow.loadURL( + `file://${path.join( + '/', + ...__dirname.split(path.sep).map(encodeURIComponent), + 'index.html', + )}`, + ); const page = mainWindow.webContents;