summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-06-03 20:27:08 +0200
committerLiam <byteslice@airmail.cc>2023-06-03 20:27:08 +0200
commita75bc759fe1459214aedcc3875209a9e4384a693 (patch)
tree5ed3eb6417e7c2ef5a68b567aab692ddb7b43c4f /src/core/hle/service
parentUpdate README.md (Add Android at builds description) (#10586) (diff)
downloadyuzu-a75bc759fe1459214aedcc3875209a9e4384a693.tar
yuzu-a75bc759fe1459214aedcc3875209a9e4384a693.tar.gz
yuzu-a75bc759fe1459214aedcc3875209a9e4384a693.tar.bz2
yuzu-a75bc759fe1459214aedcc3875209a9e4384a693.tar.lz
yuzu-a75bc759fe1459214aedcc3875209a9e4384a693.tar.xz
yuzu-a75bc759fe1459214aedcc3875209a9e4384a693.tar.zst
yuzu-a75bc759fe1459214aedcc3875209a9e4384a693.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp
index f73a864c3..427dbc8b3 100644
--- a/src/core/hle/service/filesystem/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp_srv.cpp
@@ -968,16 +968,20 @@ void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(HLERequ
void FSP_SRV::OpenDataStorageByCurrentProcess(HLERequestContext& ctx) {
LOG_DEBUG(Service_FS, "called");
- auto current_romfs = fsc.OpenRomFSCurrentProcess();
- if (current_romfs.Failed()) {
- // TODO (bunnei): Find the right error code to use here
- LOG_CRITICAL(Service_FS, "no file system interface available!");
- IPC::ResponseBuilder rb{ctx, 2};
- rb.Push(ResultUnknown);
- return;
+ if (!romfs) {
+ auto current_romfs = fsc.OpenRomFSCurrentProcess();
+ if (current_romfs.Failed()) {
+ // TODO (bunnei): Find the right error code to use here
+ LOG_CRITICAL(Service_FS, "no file system interface available!");
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(ResultUnknown);
+ return;
+ }
+
+ romfs = current_romfs.Unwrap();
}
- auto storage = std::make_shared<IStorage>(system, std::move(current_romfs.Unwrap()));
+ auto storage = std::make_shared<IStorage>(system, romfs);
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
rb.Push(ResultSuccess);