Disk-Leak: Export-ZIPs werden nicht automatisch gelöscht #4

Closed
opened 2026-04-23 14:14:18 +02:00 by ferdi2go · 1 comment
Owner

Problem\n\nserver.py:341 — Export-ZIPs im _zip_store werden nur beim Download gelöscht. Wenn der User den Tab schließt oder nie herunterlädt, bleiben ZIP-Dateien dauerhaft im Temp-Verzeichnis.\n\n## Fix\n\nBackground-Cleanup-Thread der ZIPs älter als 1 Stunde löscht:\npython\nimport time, threading\ndef _cleanup_zips():\n while True:\n time.sleep(3600)\n cutoff = time.time() - 3600\n for zip_id, path in list(_zip_store.items()):\n if os.path.getmtime(path) < cutoff:\n os.unlink(path); _zip_store.pop(zip_id, None)\nthreading.Thread(target=_cleanup_zips, daemon=True).start()\n

## Problem\n\n`server.py:341` — Export-ZIPs im `_zip_store` werden nur beim Download gelöscht. Wenn der User den Tab schließt oder nie herunterlädt, bleiben ZIP-Dateien dauerhaft im Temp-Verzeichnis.\n\n## Fix\n\nBackground-Cleanup-Thread der ZIPs älter als 1 Stunde löscht:\n```python\nimport time, threading\ndef _cleanup_zips():\n while True:\n time.sleep(3600)\n cutoff = time.time() - 3600\n for zip_id, path in list(_zip_store.items()):\n if os.path.getmtime(path) < cutoff:\n os.unlink(path); _zip_store.pop(zip_id, None)\nthreading.Thread(target=_cleanup_zips, daemon=True).start()\n```
ferdi2go added the priority: mediummaintenance labels 2026-04-23 14:14:18 +02:00
Author
Owner

Fixed in commit 69adfe6.

Fixed in commit `69adfe6`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ferdi2go/OnlyFrames#4