From 39e8ddd4f07a0174132c977e361bde6ea1f49c73 Mon Sep 17 00:00:00 2001 From: starlit Date: Fri, 31 Jul 2026 14:25:32 +0300 Subject: [PATCH 1/2] macOS: reveal comics in Finder without AppleScript "Open containing folder" on a comic drove Finder through osascript, which sends an Apple Event and therefore trips the macOS automation consent dialog ("YACReaderLibrary wants access to control Finder"). The prompt is opaque to users, since neither Info.plist declares an NSAppleEventsUsageDescription to explain the request, and denying it leaves the menu action silently doing nothing. Use `open -R ` instead. It reveals and selects the file in Finder with the same result, but goes through Launch Services rather than Apple Events, so no permission is required. This also matches how the rest of the codebase shells out to `open`. --- YACReaderLibrary/library_window.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/YACReaderLibrary/library_window.cpp b/YACReaderLibrary/library_window.cpp index 12137cc20..49f0ebf7e 100644 --- a/YACReaderLibrary/library_window.cpp +++ b/YACReaderLibrary/library_window.cpp @@ -2694,17 +2694,12 @@ void LibraryWindow::openContainingFolderComic() #endif #ifdef Q_OS_MACOS - QString filePath = file.absoluteFilePath(); + // `open -R` reveals and selects the file in Finder without sending an Apple + // Event, so it doesn't trigger the macOS automation permission prompt. QStringList args; - args << "-e"; - args << "tell application \"Finder\""; - args << "-e"; - args << "activate"; - args << "-e"; - args << "select POSIX file \"" + filePath + "\""; - args << "-e"; - args << "end tell"; - QProcess::startDetached("osascript", args); + args << "-R"; + args << file.absoluteFilePath(); + QProcess::startDetached("open", args); #endif #ifdef Q_OS_WIN From 294b5fd6bbdea005f373a3614357714e62ab692c Mon Sep 17 00:00:00 2001 From: starlit Date: Fri, 31 Jul 2026 14:47:20 +0300 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c362977d..6418b7ff0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ Version counting is based on semantic versioning (Major.Feature.Patch) * Add funtion to open the library root location. * Add a help dialog for the search engine. Use the drop down menu in the search field. * Add quick search presets. Use the drop down menu in the search field. +* Fix `open containing folder` asking for permission to control Finder on macOS. ### YACReaderLibraryServer * Add the `repair-library` command to restore missing covers and rescan files that previously failed to be added.