21
General Software Discussion / Re: Linkman save methodology
« on: March 15, 2013, 12:50 AM »
Steven, as discussed in the email, save works like this:
database.ba1 is renamed to database .ba2
database.ba0 is renamed to database .ba1
database.lmd is renamed to database .ba0
this happens before writing anything.
then the new database.lmd is written.
In case of a system crash/file system error, the .lmd file could be smaller than .ba0 file if the .lmd file was not written correctly/to the end.
database.ba1 is renamed to database .ba2
database.ba0 is renamed to database .ba1
database.lmd is renamed to database .ba0
this happens before writing anything.
then the new database.lmd is written.
In case of a system crash/file system error, the .lmd file could be smaller than .ba0 file if the .lmd file was not written correctly/to the end.