Fix updating existing mods

Replace wrename, that fails when mod exists already with RenameFile by
@Stan
Check if mod was actually installed when downloading it
error if mod cannot be coppied into modTemp

Differential revision: D4222
This was SVN commit r25854.
This commit is contained in:
Angen
2021-08-22 11:35:34 +00:00
parent 83bb6f3ed5
commit 52baaa4bbd
6 changed files with 48 additions and 8 deletions
+5 -1
View File
@@ -665,7 +665,11 @@ static void RunGameOrAtlas(int argc, const char* argv[])
// Install the mods without deleting the pyromod files
for (const OsPath& modPath : modsToInstall)
installer.Install(modPath, g_ScriptContext, true);
{
CModInstaller::ModInstallationResult result = installer.Install(modPath, g_ScriptContext, true);
if (result != CModInstaller::ModInstallationResult::SUCCESS)
LOGERROR("Failed to install '%s'", modPath.string8().c_str());
}
installedMods = installer.GetInstalledMods();