fs(feat): Add Backup Saves for Custom Save Paths

Signed-off-by: Collecting <collecting@noreply.localhost>
This commit is contained in:
Collecting
2025-12-22 08:38:42 +00:00
parent 16f928df79
commit 7ad7d8ada6

View File

@@ -431,7 +431,12 @@ std::shared_ptr<FileSys::SaveDataFactory> FileSystemController::CreateSaveDataFa
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);
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));
}
}