madMAx43v3r / chia-plotter

Apache License 2.0
2.27k stars 662 forks source link

On final copy if copy fails, source is not deleted #816

Open Mirkic7 opened 3 years ago

Mirkic7 commented 3 years ago

Problem: When plot is done, and if copy fails, when copy does finish successfully, source file is not deleted.

This is due to code - in function copy_file first source is open, and then destination. If opening destination fails, throw/catch condition is met, and we end up immediately in 5 min wait time to retry operation without closing source file. Since it is 'open', it cannot be deleted anymore without ending plotter process.