Adjust single instance call to comply with Electron 4

This commit is contained in:
Borewit
2019-05-15 17:41:01 +02:00
parent d3031ecff2
commit f475975b40
2 changed files with 62 additions and 45 deletions

View File

@@ -38,9 +38,9 @@ if (!shouldQuit && !config.IS_PORTABLE) {
// signal this instance and quit. Note: This feature creates a lock file in
// %APPDATA%\Roaming\WebTorrent so we do not do it for the Portable App since
// we want to be "silent" as well as "portable".
shouldQuit = app.makeSingleInstance(onAppOpen)
if (shouldQuit) {
if (!app.requestSingleInstanceLock()) {
app.quit()
shouldQuit = true
}
}