Fix error when deleting multiple files and no folders selected

This commit is contained in:
2023-10-14 17:28:21 +03:00
parent 1a5606a45c
commit 0c23b76456

View File

@@ -631,7 +631,7 @@ namespace FlaxEditor.Windows
// Sort items to remove files first, then folders
var toDelete = new List<ContentItem>(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)