Skip to content

Commit

Permalink
Fixed|App|libcore: Initializing an empty “persist.pack”
Browse files Browse the repository at this point in the history
Should always use the reinterpret() method for newly created archives.
  • Loading branch information
skyjake committed Feb 19, 2017
1 parent 602125f commit 81eea37
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doomsday/sdk/libcore/src/core/app.cpp
Expand Up @@ -618,9 +618,9 @@ void App::initSubsystems(SubsystemInitFlags flags)
{
ZipArchive arch;
arch.add("Info", String(QString("# Package for %1's persistent state.\n").arg(d->appName)).toUtf8());
Writer(homeFolder().replaceFile("persist.pack")) << arch;

homeFolder().populate(Folder::PopulateOnlyThisFolder);
File &persistPack = homeFolder().replaceFile("persist.pack");
Writer(persistPack) << arch;
persistPack.reinterpret()->as<ArchiveFolder>().populate();
}

// Load the persistent data.
Expand Down

0 comments on commit 81eea37

Please sign in to comment.