diff options
Diffstat (limited to 'src/utils.js')
-rw-r--r-- | src/utils.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utils.js b/src/utils.js index 35c8932..d2e6fe6 100644 --- a/src/utils.js +++ b/src/utils.js @@ -38,10 +38,15 @@ function setpath(win) { settings.gamepath = cli.param("setpath"); } else { dialog.showOpenDialog({properties: ["openDirectory"]}).then(res => { + if (res.canceled) { + ipcMain.emit("newpath", null, false); + return; + } settings.gamepath = res.filePaths[0]; settings.zip = path.join(settings.gamepath + "/northstar.zip"); saveSettings(); win.webContents.send("newpath", settings.gamepath); + ipcMain.emit("newpath", null, settings.gamepath); }).catch(err => {console.error(err)}) } |