Skip to content

Commit

Permalink
Fix system file dialog not opening on *nix systems
Browse files Browse the repository at this point in the history
Built-in commands "show_game_files" and "show_data_files" now open
system file dialogs for *nix based systems. The fix is system-agnostic
and works on Windows as well.

Resolves: #851
  • Loading branch information
jakerosado authored and Pathoschild committed Jul 6, 2024
1 parent 74e20ea commit e3e0912
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ public ShowDataFilesCommand()
/// <param name="args">The command arguments.</param>
public override void Handle(IMonitor monitor, string command, ArgumentParser args)
{
Process.Start(Constants.DataPath);
Process.Start(new ProcessStartInfo
{
FileName = Constants.DataPath,
UseShellExecute = true
});

monitor.Log($"OK, opening {Constants.DataPath}.", LogLevel.Info);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ public ShowGameFilesCommand()
/// <param name="args">The command arguments.</param>
public override void Handle(IMonitor monitor, string command, ArgumentParser args)
{
Process.Start(Constants.GamePath);
Process.Start(new ProcessStartInfo
{
FileName = Constants.GamePath,
UseShellExecute = true
});

monitor.Log($"OK, opening {Constants.GamePath}.", LogLevel.Info);
}
}
Expand Down

0 comments on commit e3e0912

Please sign in to comment.