Skip to content

Commit

Permalink
libdeng2: Serialized Config needs to use versioning
Browse files Browse the repository at this point in the history
The header is now included in the serialized Config.
  • Loading branch information
skyjake committed Dec 8, 2012
1 parent f99578f commit c96d075
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doomsday/libdeng2/src/core/config.cpp
Expand Up @@ -84,7 +84,7 @@ void Config::read()
{
// If we already have a saved copy of the config, read it.
Archive const &persist = App::persistentData();
Reader(persist.entryBlock(d->persistentPath)) >> names();
Reader(persist.entryBlock(d->persistentPath)).withHeader() >> names();

LOG_DEBUG("Found serialized Config:\n") << names();

Expand Down Expand Up @@ -114,7 +114,7 @@ void Config::read()
}
catch(Archive::NotFoundError const &)
{
// It is missing if the config hasn't been written yet.
// It is missing from persist.pack if the config hasn't been written yet.
shouldRunScript = true;
}
catch(Error const &error)
Expand All @@ -140,7 +140,7 @@ void Config::read()

void Config::write()
{
Writer(App::persistentData().entryBlock(d->persistentPath)) << names();
Writer(App::persistentData().entryBlock(d->persistentPath)).withHeader() << names();
}

Record &Config::names()
Expand Down

0 comments on commit c96d075

Please sign in to comment.