From 3c2ebe0abfaaeec266fb16c2571465b66b82e3f2 Mon Sep 17 00:00:00 2001 From: skbeh <60107333+skbeh@users.noreply.github.com> Date: Sun, 19 Feb 2023 04:24:26 +0200 Subject: [PATCH] fix error dialog show up when starting from default app --- public/electron.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/electron.js b/public/electron.js index 671a93df..4ab35697 100644 --- a/public/electron.js +++ b/public/electron.js @@ -140,7 +140,7 @@ function openFilesEventually(paths) { // https://github.com/mifi/lossless-cut/issues/639 // https://github.com/mifi/lossless-cut/issues/591 function parseCliArgs(rawArgv = process.argv) { - const ignoreFirstArgs = isDev ? 2 : 1; + const ignoreFirstArgs = process.defaultApp ? 2 : 1; // production: First arg is the LosslessCut executable // dev: First 2 args are electron and the electron.js const argsWithoutAppName = rawArgv.length > ignoreFirstArgs ? rawArgv.slice(ignoreFirstArgs) : [];