fix(backup): use DB filename as backup prefix instead of hardcoded 'mc-webui'

Backup filenames now derive from the active DB stem (e.g. mc_9cebbd27.2026-03-24.db).
Listing and cleanup glob *.db so existing mc-webui.* backups remain visible.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
MarekWo
2026-03-24 08:42:31 +01:00
parent f9bcbabb86
commit 2c73e20775
2 changed files with 5 additions and 4 deletions

View File

@@ -392,7 +392,7 @@ class TestBackup:
db.create_backup(backup_dir)
backups = db.list_backups(backup_dir)
assert len(backups) == 1
assert 'mc-webui.' in backups[0]['filename']
assert backups[0]['filename'].endswith('.db')
def test_list_backups_empty_dir(self, db):
with tempfile.TemporaryDirectory() as tmp: