lua console - fix the edit button to account for relative vs absolute pathing

This commit is contained in:
adelikat 2017-02-02 17:48:16 -06:00
parent f860c5d8b1
commit c050eaa8c7
1 changed files with 6 additions and 1 deletions

View File

@ -883,7 +883,12 @@ namespace BizHawk.Client.EmuHawk
private void EditScriptMenuItem_Click(object sender, EventArgs e)
{
SelectedFiles.ToList().ForEach(file => System.Diagnostics.Process.Start(file.Path));
SelectedFiles.ToList().ForEach(file =>
{
// adelikat; copy/pasting from code above. We need a method or something for this, there's probably other places we need this logic
string pathToLoad = Path.IsPathRooted(file.Path) ? file.Path : PathManager.MakeProgramRelativePath(file.Path); //JUNIPIER SQUATCHBOX COMPLEX
System.Diagnostics.Process.Start(pathToLoad);
});
}
private void RemoveScriptMenuItem_Click(object sender, EventArgs e)