Skip to content

Commit

Permalink
Fix for empty thcrap directory setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
David-JonesDVN committed May 11, 2020
1 parent 2c16320 commit 6225f66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Touhou Launcher/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ private void Dir_LostFocus(object sender, EventArgs e)
{
((TextBox)sender).BackColor = SystemColors.Window;
curCfg.np2Dir = np2Dir.Text;
string crapPath = Path.GetDirectoryName(crapDir.Text);
string crapPath = crapDir.Text == "" ? "" : Path.GetDirectoryName(crapDir.Text);
curCfg.crapDir = Directory.Exists(crapPath + "\\bin") ? crapPath : crapPath.TrimEnd("\\bin".ToCharArray());
curCfg.StartingRepo = crapStartingRepo.Text;
}
Expand Down

0 comments on commit 6225f66

Please sign in to comment.