Skip to content

Fix silent screenshot save authorization flow#177

Open
jeffreylyg wants to merge 1 commit into
sw33tLie:mainfrom
jeffreylyg:jeffrey/fix-silent-save-auth
Open

Fix silent screenshot save authorization flow#177
jeffreylyg wants to merge 1 commit into
sw33tLie:mainfrom
jeffreylyg:jeffrey/fix-silent-save-auth

Conversation

@jeffreylyg
Copy link
Copy Markdown

Summary

Fixes silent screenshot saving in the sandboxed app when no save directory has been authorized yet.

What was broken

Clicking the save button attempted to write directly to the configured/default save directory. When the app did not have a valid security-scoped bookmark, the write could fail silently, especially for the default Pictures fallback.

What changed

  • Added an explicit resolveIfAccessible() path for save directories with valid security-scoped access.
  • When no save directory is authorized, prompt the user once to choose a save folder.
  • Save the selected folder as a security-scoped bookmark.
  • Save the current screenshot after authorization, then silently save future screenshots to the same folder.
  • Replaced silent try? writes with do/catch logging in debug builds.
  • Applied the same behavior to the detached editor save path.

Testing

  • run locally.

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