Project

General

Profile

« Previous | Next » 

Revision b25d9022

Added by skyjake almost 11 years ago

Fixed|Cleanup|libcommon: File system usage in GameSession

This commit addresses FS2 usage issues in GameSession and applies
some cleanup.

- Folder::replaceFile() does not require a possibly existing file
to be in write mode (only the folder needs to be in write mode).
- setMode(ReadOnly) should no longer be user to finish a write;
a flush is now used instead.
- The savegames folder and its contents are always in write mode
because they inherit write mode from /home.
- Save packages are explicitly flushed after files in them are modified
(so the changes are immediately pushed to the ZIP file and don't
hang around buffered in memory until later time -- which would
be a problem after, say, a crash).
- Additionally, cleanup with DRY in mind.

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences