From 709c1e81507bf15e823069505525a7f130bba26a Mon Sep 17 00:00:00 2001 From: Alexander Kuntashov Date: Fri, 11 Nov 2022 02:26:02 +0400 Subject: [PATCH] fixes #72: Firefox open-in-chrome does not work with URLs that contain start word. --- common/common.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/common.js b/common/common.js index 652547b..1a32770 100644 --- a/common/common.js +++ b/common/common.js @@ -105,10 +105,10 @@ const open = (urls, closeIDs = []) => { exec(prefs.path, [...(app.runtime.windows.args2 || []), ...urls], r => response(r, close)); } else { - const args = app.runtime.windows.args - .map(a => a.replace('%url;', urls.join(' '))) - // Firefox is not detaching the process on Windows - .map(s => s.replace('start', isFirefox ? 'start /WAIT' : 'start')); + const args = [...app.runtime.windows.args]; + // Firefox is not detaching the process on Windows + args[1] = args[1].replace('start', isFirefox ? 'start /WAIT' : 'start'); + args[2] = args[2].replace('%url;', urls.join(' ')); exec(app.runtime.windows.name, args, res => { // use old method if (res && res.code !== 0) {