From 2260d79e2627d24e5e2709dd9a69fd17f132c512 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Wed, 1 May 2024 11:54:07 -0500 Subject: [PATCH] Trim content item name on rename --- Source/Editor/Windows/ContentWindow.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Editor/Windows/ContentWindow.cs b/Source/Editor/Windows/ContentWindow.cs index 3e29b979f..c147579f9 100644 --- a/Source/Editor/Windows/ContentWindow.cs +++ b/Source/Editor/Windows/ContentWindow.cs @@ -542,6 +542,8 @@ namespace FlaxEditor.Windows return; } + newShortName = newShortName.Trim(); + // Cache data string extension = item.IsFolder ? "" : Path.GetExtension(item.Path); var newPath = StringUtils.CombinePaths(item.ParentFolder.Path, newShortName + extension);