Skip to content

Commit

Permalink
revert last commit about modlist.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
DubbleClick authored Oct 18, 2024
1 parent 457e279 commit 1f9e5b4
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions GW Launcher/MulticlientPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,27 @@ private static IntPtr GetProcessModuleBase(IntPtr process)
var texmods = string.Join('\n', ModManager.GetTexmods(account));
if (!texmods.IsNullOrEmpty())
{
var modfile = Path.Combine(Path.GetDirectoryName(path)!, "modlist.txt");
try
{
File.WriteAllText(modfile, texmods);
}
catch (UnauthorizedAccessException)
{
err = GetErrorMessage("UnauthorizedAccessException, Failed to write texmods to modlist.txt", 0);
goto cleanup;
}
}
var modfile = Path.Combine(Directory.GetCurrentDirectory(), "modlist.txt");
try
{
File.WriteAllText(modfile, texmods);
}
catch (UnauthorizedAccessException)
{
modfile = Path.Combine(Path.GetDirectoryName(path)!, "modlist.txt");
try
{
File.WriteAllText(modfile, texmods);
}
catch (UnauthorizedAccessException)
{
err = GetErrorMessage("UnauthorizedAccessException, Failed to write texmods to modlist.txt", 0);
goto cleanup;
}

}

}

var args = $"-email \"{account.email}\" -password \"{account.password}\"";

Expand Down

0 comments on commit 1f9e5b4

Please sign in to comment.