mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-04-18 02:30:45 -04:00
fs(feat): Add Backup Saves for Custom Save Paths
Signed-off-by: Collecting <collecting@noreply.localhost>
This commit is contained in:
@@ -431,7 +431,12 @@ std::shared_ptr<FileSys::SaveDataFactory> FileSystemController::CreateSaveDataFa
|
|||||||
if (!custom_path_str.empty() && Common::FS::IsDir(custom_path)) {
|
if (!custom_path_str.empty() && Common::FS::IsDir(custom_path)) {
|
||||||
LOG_INFO(Service_FS, "Using custom save path for program_id={:016X}: {}", program_id, custom_path_str);
|
LOG_INFO(Service_FS, "Using custom save path for program_id={:016X}: {}", program_id, custom_path_str);
|
||||||
auto custom_save_directory = vfs->OpenDirectory(custom_path_str, rw_mode);
|
auto custom_save_directory = vfs->OpenDirectory(custom_path_str, rw_mode);
|
||||||
return std::make_shared<FileSys::SaveDataFactory>(system, program_id, std::move(custom_save_directory));
|
|
||||||
|
// Fetch the default NAND directory to act as the backup location
|
||||||
|
auto nand_directory = vfs->OpenDirectory(Common::FS::GetCitronPathString(CitronPath::NANDDir), rw_mode);
|
||||||
|
|
||||||
|
return std::make_shared<FileSys::SaveDataFactory>(
|
||||||
|
system, program_id, std::move(custom_save_directory), std::move(nand_directory));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user