Skip to content

Commit 62ca4cc

Browse files
author
SlavaRa
committed
Remove redundant Path.Combine(...)
1 parent 29ae5a8 commit 62ca4cc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

External/Plugins/ProjectManager/Controls/NewProjectDialog.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -554,12 +554,13 @@ private void UpdateStatusBar()
554554
string ext = ProjectExt;
555555
if (ext != null)
556556
{
557+
char separator = Path.DirectorySeparatorChar;
557558
string name = nameTextBox.Text;
558559
status = " " + TextHelper.GetString("Info.WillCreate") + " ";
559-
status += Path.Combine(locationTextBox.Text.TrimEnd('\\', '/'), name);
560-
if (createDirectoryBox.Checked) status = Path.Combine(status, name);
560+
status += locationTextBox.Text.TrimEnd('\\', '/') + separator + name;
561+
if (createDirectoryBox.Checked) status += separator + name;
561562
status += ext;
562-
status = status.Replace('\\', Path.DirectorySeparatorChar).Replace('/', Path.DirectorySeparatorChar);
563+
status = status.Replace('\\', separator).Replace('/', separator);
563564
}
564565
statusBar.Text = status;
565566
}

0 commit comments

Comments
 (0)