diff options
| author | 2018-07-19 13:11:09 -0500 | |
|---|---|---|
| committer | 2018-07-19 13:11:09 -0500 | |
| commit | e5c916a27c18d2ca09be322e20adc7731bfa73ab (patch) | |
| tree | 96bccff005c662b72a76e65dfee0d86ab7bc931b /src | |
| parent | Merge pull request #701 from lioncash/moving (diff) | |
| download | yuzu-e5c916a27c18d2ca09be322e20adc7731bfa73ab.tar.gz yuzu-e5c916a27c18d2ca09be322e20adc7731bfa73ab.tar.xz yuzu-e5c916a27c18d2ca09be322e20adc7731bfa73ab.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/filesystem/filesystem.cpp | 4 |
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 ec528ef40..a97d70a58 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) |