From c4203182670c58749e6d643b7fa7f9576264c423 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Fri, 14 Apr 2023 09:18:06 -0500 Subject: [PATCH] Fix bug with path name preventing the item to be renamed when duplicated. --- Source/Editor/Windows/ContentWindow.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Editor/Windows/ContentWindow.cs b/Source/Editor/Windows/ContentWindow.cs index 654eaa91d..f26e2e097 100644 --- a/Source/Editor/Windows/ContentWindow.cs +++ b/Source/Editor/Windows/ContentWindow.cs @@ -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)); } /// @@ -563,6 +563,7 @@ namespace FlaxEditor.Windows // Start renaming it if (targetItem != null) { + Select(targetItem); Rename(targetItem); } }