summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Sebastian Valle2018-07-19 15:23:32 -0500
committerGravatar GitHub2018-07-19 15:23:32 -0500
commit78dd1cd44103d5b23903fb29ebad87e9c8fdacda (patch)
treedafd1a532727899799a26cef2251531febde00cb
parentMerge pull request #714 from lioncash/index (diff)
parentFilesystem: Return EntryType::Directory for the root directory. (diff)
downloadyuzu-78dd1cd44103d5b23903fb29ebad87e9c8fdacda.tar.gz
yuzu-78dd1cd44103d5b23903fb29ebad87e9c8fdacda.tar.xz
yuzu-78dd1cd44103d5b23903fb29ebad87e9c8fdacda.zip
Merge pull request #720 from Subv/getentrytype_root
Filesystem: Return EntryType::Directory for the root directory.
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/filesystem/filesystem.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp
index 55282f3af..dffcdfbaf 100644
--- a/src/core/hle/service/filesystem/filesystem.cpp
+++ b/src/core/hle/service/filesystem/filesystem.cpp
@@ -193,6 +193,10 @@ ResultVal<FileSys::EntryType> VfsDirectoryServiceWrapper::GetEntryType(
193 if (dir == nullptr) 193 if (dir == nullptr)
194 return FileSys::ERROR_PATH_NOT_FOUND; 194 return FileSys::ERROR_PATH_NOT_FOUND;
195 auto filename = FileUtil::GetFilename(path); 195 auto filename = FileUtil::GetFilename(path);
196 // TODO(Subv): Some games use the '/' path, find out what this means.
197 if (filename.empty())
198 return MakeResult(FileSys::EntryType::Directory);
199
196 if (dir->GetFile(filename) != nullptr) 200 if (dir->GetFile(filename) != nullptr)
197 return MakeResult(FileSys::EntryType::File); 201 return MakeResult(FileSys::EntryType::File);
198 if (dir->GetSubdirectory(filename) != nullptr) 202 if (dir->GetSubdirectory(filename) != nullptr)