On Monday, 29 August 2022 at 15:52:31 UTC, rikki cattermole wrote:
After a bunch of playing around I managed to determine that it
is as simple as the mode.
exists(dbFileName) ? "r+" : "w+"
Will fix it.
Of course you shouldn't delete the file like that method is
doing. It should probably reinitialize the FILE* descriptor.
I didn't even think about the mode:
> `a+ or ab+ or a+b`
> "Append; open or create file for update, writing at
It must have been the "writing at end of file" bit?
Thanks Rikki. /embarrassed