diff options
| -rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index c1c83a11d..f06bb33ae 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include "core/file_sys/nca_metadata.h" | 19 | #include "core/file_sys/nca_metadata.h" |
| 20 | #include "core/file_sys/patch_manager.h" | 20 | #include "core/file_sys/patch_manager.h" |
| 21 | #include "core/file_sys/savedata_factory.h" | 21 | #include "core/file_sys/savedata_factory.h" |
| 22 | #include "core/file_sys/system_archive/system_archive.h" | ||
| 22 | #include "core/file_sys/vfs.h" | 23 | #include "core/file_sys/vfs.h" |
| 23 | #include "core/hle/ipc_helpers.h" | 24 | #include "core/hle/ipc_helpers.h" |
| 24 | #include "core/hle/kernel/process.h" | 25 | #include "core/hle/kernel/process.h" |
| @@ -657,6 +658,15 @@ void FSP_SRV::OpenDataStorageByDataId(Kernel::HLERequestContext& ctx) { | |||
| 657 | auto data = OpenRomFS(title_id, storage_id, FileSys::ContentRecordType::Data); | 658 | auto data = OpenRomFS(title_id, storage_id, FileSys::ContentRecordType::Data); |
| 658 | 659 | ||
| 659 | if (data.Failed()) { | 660 | if (data.Failed()) { |
| 661 | const auto archive = FileSys::SystemArchive::SynthesizeSystemArchive(title_id); | ||
| 662 | |||
| 663 | if (archive != nullptr) { | ||
| 664 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 665 | rb.Push(RESULT_SUCCESS); | ||
| 666 | rb.PushIpcInterface(std::make_shared<IStorage>(archive)); | ||
| 667 | return; | ||
| 668 | } | ||
| 669 | |||
| 660 | // TODO(DarkLordZach): Find the right error code to use here | 670 | // TODO(DarkLordZach): Find the right error code to use here |
| 661 | LOG_ERROR(Service_FS, | 671 | LOG_ERROR(Service_FS, |
| 662 | "could not open data storage with title_id={:016X}, storage_id={:02X}", title_id, | 672 | "could not open data storage with title_id={:016X}, storage_id={:02X}", title_id, |