Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
chooser now starts configurator directly in cage
Browse files Browse the repository at this point in the history
  • Loading branch information
DonatJR committed Jun 30, 2018
1 parent 1e1b7e7 commit 70555ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 2 additions & 4 deletions SharkCage/CageChooser/CageChooserForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ private void CheckConfigPath(string config_path, Action<string> onSuccess)
return;
}

// fixme: check if path contains cage configurator and disallow it?
if (config_path.EndsWith(".sconfig") && File.Exists(config_path))
{
onSuccess(config_path);
Expand Down Expand Up @@ -176,10 +177,7 @@ private void openCageConfiguratorButton_Click(object sender, EventArgs e)
return;
}

var p = new System.Diagnostics.Process();
p.StartInfo.FileName = $@"{install_dir}\CageConfigurator.exe";
p.StartInfo.Arguments = $@"""{configPath.Text}""";
p.Start();
NativeMethods.SendConfig($@"{install_dir}\CageConfigurator.sconfig");
}

#endregion
Expand Down
1 change: 1 addition & 0 deletions SharkCage/CageConfigurator/CageConfiguratorForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ private void CheckPath(string path, string[] file_types, Action<string> onSucces
return path.EndsWith(type);
});

// fixme: check if path contains cage configurator and disallow it?
if (matching_type && File.Exists(path))
{
onSuccess?.Invoke(path);
Expand Down

0 comments on commit 70555ae

Please sign in to comment.