fix(restore): clean up staging + session state on cancel/abandon #287
Reference in New Issue
Block a user
Delete Branch "fix/restore-cancel-cleanup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #288. Fixes an orphaned-state leak found by the restore-code audit: the restore Cancel button (added in #285) left the server session, .restore.json, and the extracted staging dir behind. Adds SteppedRestoreEngine::cancel() + ajax.restoreCancel (called from the modal before leaving) and a cleanupOldSessions() backstop that reaps orphaned mokosuitebackup-restore- staging dirs. Audit also confirmed the schema (retired sftp_*, VARCHAR include_mokorestore) and PHP 8.3 changes do NOT affect the restore path.
https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i
8c39fcf3a1toab6bee7b51