FS: pass down program ID for archive operation
To eliminate System::GetInstance usage. Archive type like SelfNCCH and SaveData changes the actual reference path for different client, so archive backend interface should accept client information from the service interface. Currently we only pass the program ID as the client information.
This commit is contained in:
parent
bad2e084e3
commit
a6d9baa05a
24 changed files with 165 additions and 99 deletions
|
@ -1362,7 +1362,7 @@ Module::Module(Core::System& system) : system(system) {
|
|||
|
||||
// Open the SystemSaveData archive 0x00010026
|
||||
FileSys::Path archive_path(cecd_system_savedata_id);
|
||||
auto archive_result = systemsavedata_factory.Open(archive_path);
|
||||
auto archive_result = systemsavedata_factory.Open(archive_path, 0);
|
||||
|
||||
// If the archive didn't exist, create the files inside
|
||||
if (archive_result.Code() != FileSys::ERR_NOT_FORMATTED) {
|
||||
|
@ -1370,10 +1370,10 @@ Module::Module(Core::System& system) : system(system) {
|
|||
cecd_system_save_data_archive = std::move(archive_result).Unwrap();
|
||||
} else {
|
||||
// Format the archive to create the directories
|
||||
systemsavedata_factory.Format(archive_path, FileSys::ArchiveFormatInfo());
|
||||
systemsavedata_factory.Format(archive_path, FileSys::ArchiveFormatInfo(), 0);
|
||||
|
||||
// Open it again to get a valid archive now that the folder exists
|
||||
cecd_system_save_data_archive = systemsavedata_factory.Open(archive_path).Unwrap();
|
||||
cecd_system_save_data_archive = systemsavedata_factory.Open(archive_path, 0).Unwrap();
|
||||
|
||||
/// Now that the archive is formatted, we need to create the root CEC directory,
|
||||
/// eventlog.dat, and CEC/MBoxList____
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue