1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-13 23:46:40 +00:00

erpt: fix reading files that don't exist

This commit is contained in:
Michael Scire 2021-04-30 14:44:53 -07:00
parent e8ba632606
commit 14ed4e4057

View file

@ -85,7 +85,7 @@ namespace ams::erpt::srv {
} else { } else {
R_UNLESS(mode == StreamMode_Read, erpt::ResultInvalidArgument()); R_UNLESS(mode == StreamMode_Read, erpt::ResultInvalidArgument());
fs::OpenFile(std::addressof(this->file_handle), path, fs::OpenMode_Read); R_TRY(fs::OpenFile(std::addressof(this->file_handle), path, fs::OpenMode_Read));
} }
auto file_guard = SCOPE_GUARD { fs::CloseFile(this->file_handle); }; auto file_guard = SCOPE_GUARD { fs::CloseFile(this->file_handle); };