tyoeer / Chaoshead

A level editor, scripting interface, campaign editor, and reverse engineering tool for Levelhead
Apache License 2.0
4 stars 1 forks source link

Safer level saving #127

Closed tyoeer closed 11 months ago

tyoeer commented 11 months ago
  1. Write to temp file
  2. Verify temp file
  3. Move original to other temp file
  4. Verify other temp file
  5. Move temp file to proper location
  6. Verify proper location
  7. Remove other temp file

This way there should always be one file verified to be correct

Faster way:

  1. Move proper to backup
  2. Write to proper
  3. Verify written proper
  4. Delete backup
tyoeer commented 11 months ago

Went for the faster way because I'm lazy and I don't want to slow down saving too much