Skip to content

Open in Finder via NSWorkspace instead of sandboxed /usr/bin/open#22

Merged
alexmodrono merged 1 commit into
mainfrom
fix/open-in-finder
Jun 3, 2026
Merged

Open in Finder via NSWorkspace instead of sandboxed /usr/bin/open#22
alexmodrono merged 1 commit into
mainfrom
fix/open-in-finder

Conversation

@alexmodrono

Copy link
Copy Markdown
Owner

Summary

The in-app "Open in Finder" / "Reveal in Finder" button did nothing. It shelled out to /usr/bin/open, which fails from a sandboxed app: the spawned tool inherits the app sandbox and its LaunchServices request to open a path outside the container is silently denied — no kernel sandbox violation, no effect (confirmed: live captures during clicks showed no open process effect and no denial).

Fix

Open the user-visible File Provider URL with NSWorkspace from the app process, holding security-scoped access (the URL from getUserVisibleURL is security-scoped). Falls back to activateFileViewerSelecting (reveal) if opening the folder fails, and logs each outcome so it's diagnosable.

Build

Compiles clean, no deprecation warnings. (Core sync + Finder population already work on build 34; this is the remaining convenience button.)

The "Open in Finder" button shelled out to /usr/bin/open, which does nothing from a sandboxed app: the spawned tool inherits the sandbox and its LaunchServices request to open a path outside the container is silently denied (no kernel sandbox violation, no effect).

Open the user-visible File Provider URL with NSWorkspace from the app process instead, holding security-scoped access (the URL is security-scoped), and fall back to revealing the item if opening the folder fails. Logs each outcome so the path is diagnosable.
@alexmodrono alexmodrono merged commit c7407bd into main Jun 3, 2026
@alexmodrono alexmodrono deleted the fix/open-in-finder branch June 3, 2026 14:23
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

Nightly Build

Download Findle Nightly (unsigned)

Built from b84b5c8.

Important

This build is unsigned. macOS will block it on first launch. To open it:

  1. Try to open the app normally — macOS will show a warning and refuse.
  2. Go to System Settings → Privacy & Security, scroll down, and click Open Anyway.
  3. The File Provider extension requires code signing and won't work in this build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant