mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-20 13:57:57 -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:
@ -421,6 +421,11 @@ ResultVal<Handle> OpenDirectoryFromArchive(Handle archive_handle, const FileSys:
|
||||
directory->path = path;
|
||||
directory->backend = archive->backend->OpenDirectory(path);
|
||||
|
||||
if (!directory->backend) {
|
||||
return ResultCode(ErrorDescription::NotFound, ErrorModule::FS,
|
||||
ErrorSummary::NotFound, ErrorLevel::Permanent);
|
||||
}
|
||||
|
||||
return MakeResult<Handle>(handle);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user