mirror of
https://github.com/SabreTools/MPF.git
synced 2026-02-03 21:29:27 +00:00
[Problem] Log zipping deletes files before archive is finished #819
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?
Originally created by @FoxhackDN on GitHub (Mar 18, 2025).
Originally assigned to: @mnadareski on GitHub.
Version
What version are you using?
Build
What runtime version are you using?
Describe the issue
I accidentally closed MPF by clicking on the X in the topbar as I had finished typing in the information on a dump, while it was zipping up the archive. MPF immediately closed. This caused the zip archive to be corrupted as the task was stopped before it was finished.
The issue here is that MPF immediately deleted the files it adds to the zip archive, instead of waiting until the logs are fully compressed. This introduces issues if MPF is shut down for any reason before it's finished. The archive itself was corrupted; luckily the files it added before that were still recoverable. But this is risky, so my suggestion is for MPF to delete the files after the zip archive is confirmed good.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I was expecting it to not delete the files on the fly.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
@Deterous commented on GitHub (Mar 18, 2025):
Fix should ideally do both of: