NOISSUE preserve minecraft.jar while migrating Legacy instances

It can be manually modded. It must be preserved when it's the only jar around.
This commit is contained in:
Petr Mrázek
2018-03-23 23:38:08 +01:00
parent 106155dd62
commit a1c713811c
3 changed files with 26 additions and 3 deletions

View File

@ -92,10 +92,10 @@ void LegacyUpgradeTask::copyFinished()
components->buildingFromScratch();
components->setComponentVersion("net.minecraft", preferredVersionNumber, true);
if(legacyInst->shouldUseCustomBaseJar())
QString jarPath = legacyInst->mainJarToPreserve();
if(!jarPath.isNull())
{
QString jarPath = legacyInst->customBaseJar();
qDebug() << "Base jar is custom! : " << jarPath;
qDebug() << "Preserving base jar! : " << jarPath;
// FIXME: handle case when the jar is unreadable?
// TODO: check the hash, if it's the same as the upstream jar, do not do this
components->installCustomJar(jarPath);