Skip to content

Commit

Permalink
Фикс выбора Batch папки
Browse files Browse the repository at this point in the history
  • Loading branch information
VaIeroK committed Feb 18, 2023
1 parent 8018b7a commit 79db816
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion OGF tool/Forms/Batch/Batch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,11 @@ private void FindPathButton_Click(object sender, EventArgs e)
FolderSelectDialog folderSelectDialog = new FolderSelectDialog();
if (folderSelectDialog.ShowDialog())
{
PathTextBox.Text = folderSelectDialog.FileName;
string fname = folderSelectDialog.FileName;
int slash_idx = fname.LastIndexOf('\\');
if (slash_idx == fname.Count() - 1)
fname = fname.Substring(0, fname.LastIndexOf('\\'));
PathTextBox.Text = fname;
Editor.pSettings.Save("BatchFolderPath", PathTextBox.Text);
}
}
Expand Down

0 comments on commit 79db816

Please sign in to comment.