[Problem] Log zipping deletes files before archive is finished #819

Closed
opened 2026-01-29 16:22:48 +00:00 by claunia · 1 comment
Owner

Originally created by @FoxhackDN on GitHub (Mar 18, 2025).

Originally assigned to: @mnadareski on GitHub.

Version
What version are you using?

  • [*] Stable release (3.3.0)

Build
What runtime version are you using?

  • [*] .NET 9.0 running on (Operating System)

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:

  1. Dump a disc
  2. Close it after finishing entering data but before it's finished zipping up the logs

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.

Originally created by @FoxhackDN on GitHub (Mar 18, 2025). Originally assigned to: @mnadareski on GitHub. **Version** What version are you using? - [*] Stable release (3.3.0) **Build** What runtime version are you using? - [*] .NET 9.0 running on (Operating System) **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: 1. Dump a disc 2. Close it after finishing entering data but before it's finished zipping up the logs **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.
claunia added the bug label 2026-01-29 16:22:48 +00:00
Author
Owner

@Deterous commented on GitHub (Mar 18, 2025):

Fix should ideally do both of:

  • Only delete files being zipped after zipping is complete
  • Capture close MPF button request and perform it only after all the submission processing is done (or just disable close button until processing is complete)
@Deterous commented on GitHub (Mar 18, 2025): Fix should ideally do both of: - Only delete files being zipped after zipping is complete - Capture close MPF button request and perform it only after all the submission processing is done (or just disable close button until processing is complete)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SabreTools/MPF#819