firmwares open folder:

don't know what was going on here, but we can't browse to a folder without it existing.
I think the best thing to do in this case is to prompt the user if it doesnt exist and offer to create it
But we don't really do this in very many places so it isnt worth the trouble to make a nice solution for it.
Anyway this commit will make it stop CRASHING on new bizhawk installs, generally, which is an improvement
This commit is contained in:
zeromus 2020-01-19 18:17:08 -05:00
parent fd960e03fe
commit 6377d78098
1 changed files with 10 additions and 1 deletions

View File

@ -354,7 +354,16 @@ namespace BizHawk.Client.EmuHawk
DoScan();
}
private void tbbOpenFolder_Click(object sender, EventArgs e) => System.Diagnostics.Process.Start(PathManager.MakeAbsolutePath(Global.Config.PathEntries.FirmwaresPathFragment, null));
private void tbbOpenFolder_Click(object sender, EventArgs e)
{
var frmWares = PathManager.MakeAbsolutePath(Global.Config.PathEntries.FirmwaresPathFragment, null);
if (!Directory.Exists(frmWares))
{
Directory.CreateDirectory(frmWares);
}
System.Diagnostics.Process.Start(frmWares);
}
private void lvFirmwares_KeyDown(object sender, KeyEventArgs e)
{