mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-12-25 01:55:39 +00:00
Filesystem: Return EntryType::Directory for the root directory.
It is unknown if this is correct behavior, but it makes sense and fixes a regression with Stardew Valley.
This commit is contained in:
parent
1bf7ae79c8
commit
e5c916a27c
|
@ -193,6 +193,10 @@ ResultVal<FileSys::EntryType> VfsDirectoryServiceWrapper::GetEntryType(
|
||||||
if (dir == nullptr)
|
if (dir == nullptr)
|
||||||
return FileSys::ERROR_PATH_NOT_FOUND;
|
return FileSys::ERROR_PATH_NOT_FOUND;
|
||||||
auto filename = FileUtil::GetFilename(path);
|
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)
|
if (dir->GetFile(filename) != nullptr)
|
||||||
return MakeResult(FileSys::EntryType::File);
|
return MakeResult(FileSys::EntryType::File);
|
||||||
if (dir->GetSubdirectory(filename) != nullptr)
|
if (dir->GetSubdirectory(filename) != nullptr)
|
||||||
|
|
Loading…
Reference in a new issue