From 1ca23fedb2c81f713085c9f64e9ac22d2f88b96d Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 6 Mar 2024 14:03:17 -0500 Subject: [PATCH] FileHandlers: Don't await long-running exec() on Windows/Linux We can await /usr/bin/open on macOS because it returns as soon as the application has begun launching, but we can't await when we exec a program directly on other platforms. Fixes #3799 --- chrome/content/zotero/xpcom/fileHandlers.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/xpcom/fileHandlers.js b/chrome/content/zotero/xpcom/fileHandlers.js index 0f0f781707..b8b5f1be69 100644 --- a/chrome/content/zotero/xpcom/fileHandlers.js +++ b/chrome/content/zotero/xpcom/fileHandlers.js @@ -276,7 +276,7 @@ Zotero.FileHandlers = { // PDF-XChange: http://help.tracker-software.com/eu/default.aspx?pageid=PDFXView25:command_line_options args.unshift('/A', 'page=' + page); } - await Zotero.Utilities.Internal.exec(appPath, args); + Zotero.Utilities.Internal.exec(appPath, args); } } ], @@ -291,7 +291,7 @@ Zotero.FileHandlers = { if (location?.position?.value) { args.push('--open-at=' + location.position.value); } - await Zotero.Utilities.Internal.exec(appPath, args); + Zotero.Utilities.Internal.exec(appPath, args); } } ] @@ -331,7 +331,7 @@ Zotero.FileHandlers = { if (page !== undefined) { args.unshift('-p', page); } - await Zotero.Utilities.Internal.exec(appPath, args); + Zotero.Utilities.Internal.exec(appPath, args); } } ], @@ -346,7 +346,7 @@ Zotero.FileHandlers = { if (location?.position?.value) { args.push('--open-at=' + location.position.value); } - await Zotero.Utilities.Internal.exec(appPath, args); + Zotero.Utilities.Internal.exec(appPath, args); } } ]