FS: Add stub for BOSS ExtSaveData archive

This commit is contained in:
Tony Wasserka 2024-05-12 14:59:12 +02:00
parent eeeb945174
commit fb67cbc947

View file

@ -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<Archive>(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<Archive>(new ArchiveHostDir(GetRootDataDirectory() / "rw"));