View Single Post
  #2678  
Old April 23rd, 2009, 05:32 PM

Ornedan Ornedan is offline
Private
 
Join Date: May 2008
Posts: 29
Thanks: 3
Thanked 4 Times in 4 Posts
Ornedan is on a distinguished road
Default Re: Bug Thread: Discussion

Quote:
Originally Posted by lch View Post
"getmany" is the function used to read data in bulk, for the data structures in the game files. It sounds like the game overwrote your fatherlnd turn files, but couldn't complete the write process because they grew too big, so now they're incomplete and useless. I hope you have backups. If not, you always should make backups.
This sounds like a bug. It should be possible to avoid data loss by doing something like:
Code:
write("fatherlnd.new", fatherlnd_data)
fsync
rename("fatherlnd.new", "fatherlnd")
fsync
which should ensure that data loss can only happen due to a crash during the rename. In all other cases, either old or new state is intact and in place.
Reply With Quote