FileManager findfiles issue

Hello, I am having some issue using an UE4 c++ feature

FString MMSPath = FPaths::GameSavedDir()+"SaveGames/";
    if (!FPaths::DirectoryExists(MMSPath))
    	return;
    
    IFileManager& FileManager = IFileManager::Get();
    FString FileExtension = ".sav";
    
    FileManager.FindFiles(ProfilesList, *MMSPath, *FileExtension);
    
    if (ProfilesList.Num() == 0) return;
    UE_LOG(LogTemp, Warning, TEXT("Number of save(s) found %i"), ProfilesList.Num());

this returns me twice the files, there are two files, array.Num = 4.
https://puu.sh/yZTnJ/8df9cbbaf2.png
https://puu.sh/yZTq5/0f82b50cff.png

Why ?

Hey there, what did the UE_LOG said? If you try it without using the sav extension, do you get the same number?

Logs says 4, as i said, but i have only 2 files, so something’s wrong here with FindFiles

Could you print the filenames he finds? You might have hidden files there.

We had a similar issue with IFileManager::FindFilesRecursive. The function was returning a multiple of the found files. The issue was a modified PlatformFile-Chain. We did the modification because we are mounting .pak files at runtime.

See my post in: Mounting pak files at runtime - Programming & Scripting - Unreal Engine Forums