Closed rloomans closed 2 years ago
Thanks for sharing this... I'm sorry if it damaged your files.
Maybe this is the way to go:
Definitely do the graceful termination.
The other thing (that I call "rename into place" above) is where apps write a new file, close it, and then rename it over the old file. That way you either get the old file or the new file, not a corrupted mix of the two.
(My files are sitting on a NAS with filesystem snapshots... I noticed right away and could pull out an older copy)
Fixed in latest code, targeted for release v0.0.9
v0.0.9 has been released, feedback would be very welcome. If this happens to you again, I have to take another look.
I had tone writing tags to a collection of .m4b files and I needed to interrupt it so I could get something else done.
When I pressed Control-C tone exited immediately and left the file it was writing to corrupted so that it was unrecognisable and unplayable.
Tone should either write a new file and rename into place, and/or install a signal handler to exit gracefully once it's finished writing the current file. Ideally, it should do both