I've been encountering problems with intermittent stray lines on the end of the statefile that stop CamillaDSP reading the statefile the next time it starts. It turns out the problem was the state file was being written without the "truncate" flag, meaning if the new file was shorter than the old one, characters or lines from the old statefile were still present at the end of the new file.
This PR adds the truncate flag to OpenOptions when the statefile is written, avoiding the problem.
I've been encountering problems with intermittent stray lines on the end of the statefile that stop CamillaDSP reading the statefile the next time it starts. It turns out the problem was the state file was being written without the "truncate" flag, meaning if the new file was shorter than the old one, characters or lines from the old statefile were still present at the end of the new file. This PR adds the truncate flag to OpenOptions when the statefile is written, avoiding the problem.