mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-06-28 05:52:39 +02:00
erpt: fix reading files that don't exist
This commit is contained in:
parent
acee57e888
commit
64ec9a7421
@ -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); };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user