From 14ed4e4057fac86937dbb867286e8ccad1d1a9f0 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Fri, 30 Apr 2021 14:44:53 -0700 Subject: [PATCH] erpt: fix reading files that don't exist --- libraries/libstratosphere/source/erpt/srv/erpt_srv_stream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/libstratosphere/source/erpt/srv/erpt_srv_stream.cpp b/libraries/libstratosphere/source/erpt/srv/erpt_srv_stream.cpp index 64d43aeea..68863a754 100644 --- a/libraries/libstratosphere/source/erpt/srv/erpt_srv_stream.cpp +++ b/libraries/libstratosphere/source/erpt/srv/erpt_srv_stream.cpp @@ -85,7 +85,7 @@ namespace ams::erpt::srv { } else { 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); };