Lock down the version cache. Just enough to make it annoying to corrupt the files.

This commit is contained in:
Petr Mrázek
2014-05-13 23:57:34 +02:00
parent f3900f2966
commit 55a0d110b6
8 changed files with 99 additions and 46 deletions

View File

@ -56,9 +56,9 @@ bool MinecraftVersion::isMinecraftVersion()
// 2. if discrepancies are found, fall out and fail (impossible to apply incomplete version).
void MinecraftVersion::applyFileTo(VersionFinal *version)
{
QFileInfo versionFile(QString("versions/%1/%1.json").arg(m_descriptor));
QFileInfo versionFile(QString("versions/%1/%1.dat").arg(m_descriptor));
auto versionObj = VersionBuilder::parseJsonFile(versionFile, false, false);
auto versionObj = VersionBuilder::parseBinaryJsonFile(versionFile);
versionObj->applyTo(version);
}