librelad b0a00649f7 ownership: find an app wherever it lives, not only under the primary root
_app_dir resolved an app name to "$CONTAINERS_DIR/$app" and gave up if that did
not exist. An app on a registered storage location is not there, so every root
action keyed on an app name quietly did nothing for those:

    app-data-remove linkding   ->  rc=0, nothing removed

which is what restoreAppStart calls at step 4, "Wiping existing app folder". So
restoring an app that lives on a second disk laid the snapshot over whatever was
already there instead of replacing it, and files deleted since the backup would
survive a restore meant to undo their deletion.

Search the primary root first, then each REGISTERED location. Candidate paths
come from the root-owned registry and never from the caller, so this cannot be
pointed anywhere root does not already own. app_data_remove goes through the
resolver now instead of building the path itself.

Found by the flow test: destroying linkding on disk1 reported success and left
all nineteen files in place.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-28 13:14:17 +01:00
..