FileHandlers: Fix Acrobat and PDF Expert not opening on macOS

Fixes #3771
This commit is contained in:
Abe Jellinek 2024-02-29 09:24:11 -08:00
parent 352f71e32e
commit ae441c6db1

View file

@ -195,7 +195,8 @@ Zotero.FileHandlers = {
},
{
name: /Adobe Acrobat/,
async open(appPath, { page }) {
async open(appPath, { filePath, page }) {
await Zotero.Utilities.Internal.exec('/usr/bin/open', ['-a', appPath, filePath]);
if (page !== undefined) {
// Go to page using AppleScript
let args = [
@ -228,7 +229,8 @@ Zotero.FileHandlers = {
},
{
name: /PDF Expert/,
async open(appPath, { page }) {
async open(appPath, { filePath, page }) {
await Zotero.Utilities.Internal.exec('/usr/bin/open', ['-a', appPath, filePath]);
// Go to page using AppleScript (same as Preview)
let args = [
'-e', `tell app "${appPath}" to activate`