Compare commits

..
Author SHA1 Message Date
Tannin 8bf91045b5 - NCC will now report an error if a script tries to extract a non-existent file instead of creating an empty output file
- ncc installer plugin now uses a more reliable method to force the installer window to the foreground
- missing version on TESV.exe will no longer be reported as an error
- bugfix: loot client didn't read list of active mods
- bugfix: invalid free call in error reporting function
2014-05-15 19:11:19 +02:00
2 changed files with 19 additions and 6 deletions
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.IO;
using Nexus.Client.ModManagement.Scripting;
using Nexus.Client.ModManagement.InstallationLog;
@@ -194,6 +195,7 @@ namespace Nexus.Client.ModManagement
/// not to overwrite an existing file.</returns>
public bool InstallFileFromMod(string p_strModFilePath, string p_strInstallPath, bool p_booSecondaryInstallPath)
{
Console.WriteLine("install " + p_strModFilePath + " to " + p_strInstallPath);
string destinationPath = installPath(p_strInstallPath, p_booSecondaryInstallPath);
if (!Directory.Exists(Path.GetDirectoryName(destinationPath)))
@@ -239,10 +241,21 @@ namespace Nexus.Client.ModManagement
TransactionalFileManager.Delete(destinationPath);
}
}
using (FileStream stream = File.Create(destinationPath))
try {
using (FileStream stream = File.Create(destinationPath))
{
Mod.ExtractFileTo(p_strModFilePath, stream);
}
}
catch (FileNotFoundException e)
{
Mod.ExtractFileTo(p_strModFilePath, stream);
MessageBox.Show("File " + p_strModFilePath + " couldn't be extracted.\n" +
"This probably means the mod is broken though you may still get partial functionality.\n" +
"Please inform the mod author.\n" +
"Detailed Error: " + e.Message, "File not found in FOMod", MessageBoxButtons.OK, MessageBoxIcon.Error);
File.Delete(destinationPath);
throw;
}
// Checks whether the file is a gamebryo plugin
@@ -11,12 +11,12 @@
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<StartArguments>-g Skyrim -p "D:\Tannin_Documents\Projects\ModOrganizer_sf\output\profiles\gna2\plugins.txt" -i "D:\Tannin_Documents\Projects\ModOrganizer_sf\output\downloads\SkyUI_4_1-3863-4-1.7z" "D:\Tannin_Documents\Projects\ModOrganizer_sf\output\mods\skyui"</StartArguments>
<StartArguments>-g Skyrim -p "E:\Documents\Projects\ModOrganizer_sf\output\profiles\adminowned\plugins.txt" -i "E:\Documents\Projects\ModOrganizer_sf\output\downloads\Caliente Female Body Mod BBE v3-2-2666-3-2-3.7z" "E:\Documents\Projects\ModOrganizer_sf\output\mods\cbbe"</StartArguments>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<StartWorkingDirectory>D:\Tannin_Documents\Projects\ModOrganizer_sf\source\NCC\nmm\bin\Debug\</StartWorkingDirectory>
<StartWorkingDirectory>E:\Documents\Projects\ModOrganizer_sf\source\NCC\nmm\bin\Debug\</StartWorkingDirectory>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<StartArguments>-g Skyrim -p "E:\Documents\Projects\ModOrganizer_sf\output\profiles\adminowned\plugins.txt" -i "E:\Documents\Projects\ModOrganizer_sf\output\downloads\animated clutter-48287-1-8-2.7z" "E:\Documents\Projects\ModOrganizer_sf\output\mods\Animated clutter"</StartArguments>
<StartArguments>-g Skyrim -p "E:\Documents\Projects\ModOrganizer_sf\output\profiles\adminowned\plugins.txt" -i "E:\Documents\Projects\ModOrganizer_sf\output\downloads\Caliente Female Body Mod BBE v3-2-2666-3-2-3.7z" "E:\Documents\Projects\ModOrganizer_sf\output\mods\cbbe"</StartArguments>
<StartWorkingDirectory />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">