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:
@@ -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);
|
||||
|
@@ -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");
|
||||
|
Reference in New Issue
Block a user