mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 19:28:02 -05:00
Make OpenDirectory fail if the directory doesn't exist
This is in line with what the hardware itself does. It does this by splitting the initial directory opening into Directory.Open(), which will return false if a stat fails. Then, Archive::OpenDirectory will return nullptr, and archive.cpp will return an error code .
This commit is contained in:
@ -100,6 +100,8 @@ bool Archive_SDMC::RenameDirectory(const FileSys::Path& src_path, const FileSys:
|
||||
std::unique_ptr<Directory> Archive_SDMC::OpenDirectory(const Path& path) const {
|
||||
DEBUG_LOG(FILESYS, "called path=%s", path.DebugStr().c_str());
|
||||
Directory_SDMC* directory = new Directory_SDMC(this, path);
|
||||
if (!directory->Open())
|
||||
return nullptr;
|
||||
return std::unique_ptr<Directory>(directory);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user