Browse Source
Merge pull request #10594 from liamwhite/double-patch
fsp-srv: avoid patching romfs multiple times
pull/15/merge
bunnei
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
12 additions and
8 deletions
-
src/core/hle/service/filesystem/fsp_srv.cpp
|
|
|
@ -968,6 +968,7 @@ void FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(HLERequ |
|
|
|
void FSP_SRV::OpenDataStorageByCurrentProcess(HLERequestContext& ctx) { |
|
|
|
LOG_DEBUG(Service_FS, "called"); |
|
|
|
|
|
|
|
if (!romfs) { |
|
|
|
auto current_romfs = fsc.OpenRomFSCurrentProcess(); |
|
|
|
if (current_romfs.Failed()) { |
|
|
|
// TODO (bunnei): Find the right error code to use here
|
|
|
|
@ -977,7 +978,10 @@ void FSP_SRV::OpenDataStorageByCurrentProcess(HLERequestContext& ctx) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
auto storage = std::make_shared<IStorage>(system, std::move(current_romfs.Unwrap())); |
|
|
|
romfs = current_romfs.Unwrap(); |
|
|
|
} |
|
|
|
|
|
|
|
auto storage = std::make_shared<IStorage>(system, romfs); |
|
|
|
|
|
|
|
IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
|
|
|
rb.Push(ResultSuccess); |
|
|
|
|