DCVolo
(DCVolo)
January 12, 2018, 5:05pm
1
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 ?
xlar8or
(xlar8or)
January 14, 2018, 12:15pm
2
Hey there, what did the UE_LOG said? If you try it without using the sav extension, do you get the same number?
DCVolo
(DCVolo)
January 25, 2018, 9:17am
3
Logs says 4, as i said, but i have only 2 files, so something’s wrong here with FindFiles
xlar8or
(xlar8or)
January 25, 2018, 11:31am
4
Could you print the filenames he finds? You might have hidden files there.
Rumbleball
(Rumbleball)
October 30, 2018, 6:18pm
5
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