From 0c23b764568abd4994260a34bd655c23de026d67 Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Sat, 14 Oct 2023 17:28:21 +0300 Subject: [PATCH] Fix error when deleting multiple files and no folders selected --- 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 c287900e5..d43174cf3 100644 --- a/Source/Editor/Windows/ContentWindow.cs +++ b/Source/Editor/Windows/ContentWindow.cs @@ -631,7 +631,7 @@ namespace FlaxEditor.Windows // Sort items to remove files first, then folders var toDelete = new List(items); - toDelete.Sort((a, b) => a.IsFolder ? 1 : -1); + toDelete.Sort((a, b) => a.IsFolder ? 1 : b.IsFolder ? -1 : a.Compare(b)); string msg = toDelete.Count == 1 ? string.Format("Are you sure to delete \'{0}\'?\nThis action cannot be undone. Files will be deleted permanently.", items[0].Path)