Fix bug with path name preventing the item to be renamed when duplicated.

This commit is contained in:
Chandler Cox
2023-04-14 09:18:06 -05:00
parent 4bdeb26e74
commit c420318267

View File

@@ -536,7 +536,7 @@ namespace FlaxEditor.Windows
destinationName = StringUtils.IncrementNameNumber(item.ShortName, x => !File.Exists(StringUtils.CombinePaths(sourceFolder, x + extension))) + extension;
}
return StringUtils.CombinePaths(sourceFolder, destinationName);
return StringUtils.NormalizePath(StringUtils.CombinePaths(sourceFolder, destinationName));
}
/// <summary>
@@ -563,6 +563,7 @@ namespace FlaxEditor.Windows
// Start renaming it
if (targetItem != null)
{
Select(targetItem);
Rename(targetItem);
}
}