Disk-Leak: Export-ZIPs werden nicht automatisch gelöscht #4
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?
Problem\n\n
server.py:341— Export-ZIPs im_zip_storewerden 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()\nFixed in commit
69adfe6.