Skip to content
Permalink
Browse files

fix: correctly parse default_app path on windows (#18086)

  • Loading branch information...
MarshallOfSound committed May 1, 2019
1 parent 496d796 commit 913bd4c83212f9767f55a5bd03108f7036647507
Showing with 5 additions and 1 deletion.
  1. +5 −1 default_app/default_app.ts
@@ -30,7 +30,11 @@ function isTrustedSender (webContents: Electron.WebContents) {
}

const parsedUrl = new URL(webContents.getURL())
return parsedUrl.protocol === 'file:' && parsedUrl.pathname === indexPath
const urlPath = process.platform === 'win32'
// Strip the prefixed "/" that occurs on windows
? path.resolve(parsedUrl.pathname.substr(1))
: parsedUrl.pathname
return parsedUrl.protocol === 'file:' && urlPath === indexPath
}

ipcMain.on('bootstrap', (event) => {

0 comments on commit 913bd4c

Please sign in to comment.
You can’t perform that action at this time.