Commit def40ba
Fix macOS sidebar empty after restart or app update (#38)
Bookmarks were created and resolved with `options: []` instead of
`.withSecurityScope`, so the sandbox access grant was not embedded
in the bookmark data. macOS sometimes caches grants across restarts,
masking the bug — but OS updates and app re-signs clear the cache,
leaving `contentsOfDirectory` to fail silently and the sidebar empty.
Changes:
- Use `.withSecurityScope` when creating and resolving bookmarks
- Check and log `startAccessingSecurityScopedResource()` return value
- Replace silent `try?` in `contentsOfDirectory` with explicit error
logging
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 156d7eb commit def40ba
1 file changed
Lines changed: 18 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
127 | 131 | | |
128 | 132 | | |
129 | 133 | | |
| |||
501 | 505 | | |
502 | 506 | | |
503 | 507 | | |
504 | | - | |
| 508 | + | |
505 | 509 | | |
506 | 510 | | |
507 | 511 | | |
| |||
520 | 524 | | |
521 | 525 | | |
522 | 526 | | |
523 | | - | |
| 527 | + | |
524 | 528 | | |
525 | 529 | | |
526 | 530 | | |
| |||
529 | 533 | | |
530 | 534 | | |
531 | 535 | | |
532 | | - | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
533 | 539 | | |
534 | 540 | | |
535 | 541 | | |
| |||
0 commit comments