Skip to content

Commit

Permalink
Added error log if bootloader dll fails to be moved into game dir (Su…
Browse files Browse the repository at this point in the history
…bnauticaNitrox#1211)

* Removed unused field in NitroxEntryPatch.cs

* Added error log if launcher fails to move bootloader dll into game dir
  • Loading branch information
Measurity authored Aug 9, 2020
1 parent 07a538a commit 08123c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions NitroxLauncher/LauncherLogic.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
Expand Down Expand Up @@ -215,9 +214,9 @@ internal async Task StartMultiplayerAsync()
{
File.Copy(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "lib", bootloaderName), Path.Combine(subnauticaPath, "Subnautica_Data", "Managed", bootloaderName), true);
}
catch (IOException)
catch (IOException ex)
{
// ignored
Log.Error(ex, "Unable to move bootloader dll to Managed folder. Still attempting to launch because it might exist from previous runs.");
}

nitroxEntryPatch.Remove(); // Remove any previous instances first.
Expand Down
1 change: 0 additions & 1 deletion NitroxLauncher/Patching/NitroxEntryPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ private static int FindNitroxExecuteInstructionIndex(IList<Instruction> methodIn
private bool IsPatchApplied()
{
string gameInputPath = Path.Combine(subnauticaManagedPath, GAME_ASSEMBLY_NAME);
string nitroxPatcherPath = Path.Combine(subnauticaManagedPath, NITROX_ASSEMBLY_NAME);

using (ModuleDefMD module = ModuleDefMD.Load(gameInputPath))
{
Expand Down

0 comments on commit 08123c8

Please sign in to comment.