From a1b92dea3fccd374ed0efcb710882d493cf7164a Mon Sep 17 00:00:00 2001 From: Labhansh Agrawal Date: Fri, 29 May 2020 10:31:49 +0530 Subject: [PATCH] fix breaking change in shell.openItem https://github.com/electron/electron/pull/20682 --- app/config/open.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/config/open.ts b/app/config/open.ts index 7eb4fcbf..9db0ea64 100644 --- a/app/config/open.ts +++ b/app/config/open.ts @@ -71,7 +71,7 @@ export default () => { return hasDefaultSet() .then((yes) => { if (yes) { - return shell.openItem(cfgPath); + return shell.openPath(cfgPath).then((error) => error === ''); } console.warn('No default app set for .js files, using notepad.exe fallback'); return openNotepad(cfgPath); @@ -81,6 +81,6 @@ export default () => { return openNotepad(cfgPath); }); } else { - return Promise.resolve(shell.openItem(cfgPath)); + return Promise.resolve(shell.openPath(cfgPath).then((error) => error === '')); } };