Let sandboxed agents use mktemp, and keep backups from waiting on prompts
macOS' mktemp uses the per-user temp folder in /var/folders, not TMPDIR, so the sandbox now allows writing there. The sandbox's settings move out of it, to Application Support, which the agent can't read or write. Without Full Disk Access, reading Desktop, Documents, Downloads, other apps' containers or Photos makes macOS ask, and restic waited for an answer no one gives at night. The backup now leaves those out until it has Full Disk Access, as configure backup already said it did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
eab26c0888
commit
ad97e68db1
@@ -142,6 +142,21 @@ excludes=(
|
||||
# Element's search index for encrypted messages, which it rebuilds
|
||||
"$L/Application Support/Element/EventStore"
|
||||
)
|
||||
# Without Full Disk Access, reading these makes macOS ask you, and restic
|
||||
# waits for the answer, which no one gives at night; the rest that Full Disk
|
||||
# Access guards (Mail, Messages, Safari...) is just refused
|
||||
if ! full_disk_access; then
|
||||
excludes+=(
|
||||
"$HOME/Desktop"
|
||||
"$HOME/Documents"
|
||||
"$HOME/Downloads"
|
||||
"$L/Containers"
|
||||
"$L/Group Containers"
|
||||
# Photos asks too
|
||||
"$L/Photos"
|
||||
"$HOME/Pictures/*.photoslibrary"
|
||||
)
|
||||
fi
|
||||
exclude_args=(--exclude-caches)
|
||||
for path in "${excludes[@]}"; do
|
||||
exclude_args+=(--exclude "$path")
|
||||
|
||||
Reference in New Issue
Block a user