yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

Merge pull request #720 from Subv/getentrytype_root

Filesystem: Return EntryType::Directory for the root directory.
This commit is contained in:
Sebastian Valle 2018-07-19 15:23:32 -05:00 committed by GitHub
commit 78dd1cd441
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -193,6 +193,10 @@ ResultVal<FileSys::EntryType> VfsDirectoryServiceWrapper::GetEntryType(
if (dir == nullptr)
return FileSys::ERROR_PATH_NOT_FOUND;
auto filename = FileUtil::GetFilename(path);
// TODO(Subv): Some games use the '/' path, find out what this means.
if (filename.empty())
return MakeResult(FileSys::EntryType::Directory);
if (dir->GetFile(filename) != nullptr)
return MakeResult(FileSys::EntryType::File);
if (dir->GetSubdirectory(filename) != nullptr)