NOISSUE do not fail when the Flame overrides folder is missing

This commit is contained in:
Petr Mrázek 2017-09-26 01:36:52 +02:00
parent a269e0c92f
commit f26ca143c4

View File

@ -200,11 +200,18 @@ void InstanceImportTask::processFlame()
if(!pack.overrides.isEmpty())
{
QString overridePath = FS::PathCombine(m_stagingPath, pack.overrides);
QString mcPath = FS::PathCombine(m_stagingPath, "minecraft");
if (!QFile::rename(overridePath, mcPath))
if (QFile::exists(overridePath))
{
emitFailed(tr("Could not rename the overrides folder:\n") + pack.overrides);
return;
QString mcPath = FS::PathCombine(m_stagingPath, "minecraft");
if (!QFile::rename(overridePath, mcPath))
{
emitFailed(tr("Could not rename the overrides folder:\n") + pack.overrides);
return;
}
}
else
{
qWarning() << "The specified overrides folder is missing. Maybe the modpack was already used before?";
}
}