There is a potential bug in ULevel::FixupActorFolders() in the FixDuplicateFolders section:
Suppose you have a folder hierarchy that looks like this:
where the letters are the names of the folders and the numbers are used to distinguish between folders with duplicate names. All the folder paths are:
All but the first are duplicates. There will be two sets of folders in PathToFolders:
and
SortedDuplicatePaths will contain:
After the first pass through the loop starting at line 3043 of Level.cpp, FoldersToKeep will contain:
and FoldersToDelete will contain:
The problem happens in the second pass through the loop during the search for FolderToKeep. The parent of A/B(2)/C(1) is A/B(2) and the parent of A/B(3)/C(2) is A/B(3). Both are to be deleted. As a result, FolderToKeep is not set and the check() on line 3058 fails.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-247282 in the post.