From fb67cbc9475000247d646118217f035352949276 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Sun, 12 May 2024 14:59:12 +0200 Subject: [PATCH] FS: Add stub for BOSS ExtSaveData archive --- source/processes/fs.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/source/processes/fs.cpp b/source/processes/fs.cpp index b6b4be5..cfe2003 100644 --- a/source/processes/fs.cpp +++ b/source/processes/fs.cpp @@ -680,14 +680,17 @@ public: } Result DeleteFile(FakeThread&, FSContext&, uint32_t, uint32_t, IPC::StaticBuffer) override final { - throw std::runtime_error(fmt::format("TODO: Implement DeleteFile for archive {:#x}", archive_id)); + return RESULT_OK; } Result DeleteDirectory(FakeThread&, FSContext&, uint32_t, bool recursive, uint32_t, IPC::StaticBuffer) override final { throw std::runtime_error(fmt::format("TODO: Implement OpenDirectory for archive {:#x}", archive_id)); } -}; + Result RenameFile(FakeThread&, FakeFS&, uint32_t transaction, uint32_t source_path_type, IPC::StaticBuffer source_path, uint32_t target_path_type, IPC::StaticBuffer target_path) override final { + throw std::runtime_error(fmt::format("TODO: Implement RenameFile for archive {:#x}", archive_id)); + } +}; /// Base class for archives that do not directly map to a PXIFS archive class ArchiveNonPXI : public Archive, PathValidator { @@ -2566,6 +2569,12 @@ OpenArchive(FakeThread& thread, FSContext& context, ProcessId process_id, uint32 return std::make_tuple(RESULT_OK, std::move(archive)); } + case 0x12345678: + { + auto archive = std::unique_ptr(new ArchiveDummy(thread, context, path_type, path, archive_id)); + return std::make_tuple(RESULT_OK, std::move(archive)); + } + case 0x1234567d: { auto archive = std::unique_ptr(new ArchiveHostDir(GetRootDataDirectory() / "rw"));