Check file existence early. Although, not sure if this is the right

thing on Android...
This commit is contained in:
Henrik Rydgård 2023-03-07 20:59:34 +01:00
parent 10ecc4afbd
commit 16b0e1103a

View File

@ -44,8 +44,13 @@ public:
};
VFSFileReference *DirectoryReader::GetFile(const char *path) {
Path filePath = path_ / path;
if (!File::Exists(filePath)) {
return nullptr;
}
DirectoryReaderFileReference *reference = new DirectoryReaderFileReference();
reference->path = path_ / path;
reference->path = filePath;
return reference;
}