Skip to content

Commit

Permalink
Fixed error when updating loaders
Browse files Browse the repository at this point in the history
  • Loading branch information
thesupersonic16 committed Nov 21, 2023
1 parent 82dfa6b commit b9a58ae
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions HedgeModManager/HedgeApp.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -786,9 +786,11 @@ public static bool InstallOtherLoader(bool toggle = true)
}

// Note: This will not work if the DLL within the zip is not {ModLoaderID}.dll
// Rename modloader
File.Move(Path.ChangeExtension(filePath, ".dll"),
Path.Combine(StartDirectory, CurrentGame.ModLoader.ModLoaderFileName));
// Replace modloader
string loaderPath = Path.Combine(StartDirectory, CurrentGame.ModLoader.ModLoaderFileName);
if (File.Exists(loaderPath))
File.Delete(loaderPath);
File.Move(Path.ChangeExtension(filePath, ".dll"), loaderPath);

// Delete temp file
try
Expand Down

0 comments on commit b9a58ae

Please sign in to comment.