Skip to content

Commit

Permalink
fix: only override runner if input is null, unset override otherwise
Browse files Browse the repository at this point in the history
  • Loading branch information
Blooym committed Mar 14, 2024
1 parent 37f4a8a commit 115559e
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,17 @@ public SettingsTabDalamud()
new SettingsEntry<DirectoryInfo>("Manual Injection Path", "The path to the local version of Dalamud where Dalamud.Injector.exe is located", () => Program.Config.DalamudManualInjectPath, (input) =>
{
Program.Config.DalamudManualInjectPath = input;
Program.DalamudUpdater.RunnerOverride = new FileInfo(Path.Combine(input!.FullName, Program.DALAMUD_INJECTOR_NAME));
if (input is null) {
Program.DalamudUpdater.RunnerOverride = null;
return;
}
Program.DalamudUpdater.RunnerOverride = new FileInfo(Path.Combine(input.FullName, Program.DALAMUD_INJECTOR_NAME));
})
{
CheckVisibility = () => enableManualInjection.Value,
CheckVisibility = () => enableManualInjection.Value,
CheckValidity = input =>
{
if (input is null || !input.Exists)
if (input is null || !input.Exists)
{
return "There is no directory at that path.";
}
Expand Down

0 comments on commit 115559e

Please sign in to comment.