fix: CLI snapshot delete uses file_path instead of data_file column #184
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Summary
SnapshotCommand.php:230-234references$record->file_pathwhen the actual DB column isdata_file. The CLImokosuitebackup:snapshot deletesilently skips file deletion, leaving orphaned JSON files on disk.Location
source/packages/plg_console_mokosuitebackup/src/Command/SnapshotCommand.php:230-234Fix
Change
$record->file_pathto$record->data_file.Branch created:
feature/184-fix-cli-snapshot-delete-uses-file-path-iConfirmed @ 02.56.05 — keep open.
plg_console_mokosuitebackup/src/Command/SnapshotCommand.php:230-234still references$record->file_path, but the snapshots table column isdata_file(sql/install.mysql.sql:75—data_file VARCHAR(512), "Absolute path to JSON snapshot file"). There is nofile_pathcolumn, sois_file($record->file_path)is always empty and file deletion is silently skipped. One-line fix: usedata_file.