From 07f58558e35dd3acad541a523f6a96f8e6790fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Jech?= Date: Mon, 21 Dec 2020 03:58:52 +0100 Subject: [PATCH] Force proper extension if manually specified by user during asset creation --- Source/Editor/Windows/ContentWindow.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Editor/Windows/ContentWindow.cs b/Source/Editor/Windows/ContentWindow.cs index 1cf3a24f7..acea1e665 100644 --- a/Source/Editor/Windows/ContentWindow.cs +++ b/Source/Editor/Windows/ContentWindow.cs @@ -318,7 +318,7 @@ namespace FlaxEditor.Windows // Cache data var extension = Path.GetExtension(item.Path); - var newPath = StringUtils.CombinePaths(item.ParentFolder.Path, newShortName + extension); + var newPath = StringUtils.CombinePaths(item.ParentFolder.Path, Path.ChangeExtension(newShortName, extension)); // Check if was renaming mock element // Note: we create `_newElement` and then rename it to create new asset