769d069d0a
* delete old database directories * check if state directory exists * skip deleting when ephemeral * split `check_and_delete_old_databases` * move `check_and_delete_old_databases` to state * spawn `check_and_delete_old_databases` * simplity a bit * fix(state): only delete old database directories inside the cache directory (#4631) * Add function comments, tweak log * Simplify version parsing * Use spawn_blocking to launch the task on a separate thread, do the cleanup last * Abort the cleanup task when Zebra exits * Split directory deletion into its own function, handle ownership * Rename cache_dir to state_dir * If an outdated state directory is outside the cache directory, don't delete it * Minimise diffs * add test * fix typos Co-authored-by: teor <teor@riseup.net> * add `canonicalize` to test regex * add another match to test Co-authored-by: teor <teor@riseup.net> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> |
||
---|---|---|
.. | ||
common | ||
acceptance.rs |