1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-08 23:22:25 +02:00

- minor refactoring for filesystem, moved checksum calculation to

loading stage from initialization
- fixes for launcher
This commit is contained in:
Ivan Savenko
2013-12-11 17:12:39 +00:00
parent 69eee05ccc
commit ed329c5a1f
5 changed files with 44 additions and 31 deletions

View File

@@ -536,11 +536,8 @@ void CModListView::installMods(QStringList archives)
for (int i=0; i<modNames.size(); i++)
manager->installMod(modNames[i], archives[i]);
if (settings["launcher"]["enableInstalledMods"].Bool())
{
for (QString mod : modNames)
manager->enableMod(mod);
}
for (QString mod : modsToEnable)
manager->enableMod(mod);
for (QString archive : archives)
QFile::remove(archive);

View File

@@ -212,8 +212,10 @@ bool CModManager::doInstallMod(QString modname, QString archivePath)
if (!QFile(archivePath).exists())
return addError(modname, "Mod archive is missing");
if (QDir(destDir + modname).exists()) // FIXME: recheck wog/vcmi data behavior - they have bits of data in our trunk
return addError(modname, "Mod with such name is already installed");
// FIXME: recheck wog/vcmi data behavior - they have bits of data in our trunk
// FIXME: breaks when there is Era mod with same name
//if (QDir(destDir + modname).exists())
// return addError(modname, "Mod with such name is already installed");
if (localMods.contains(modname))
return addError(modname, "Mod with such name is already installed");