ams: support building unit test programs on windows/linux/macos

This commit is contained in:
Michael Scire
2022-03-06 12:08:20 -08:00
committed by SciresM
parent 9a38be201a
commit 64a97576d0
756 changed files with 33359 additions and 9372 deletions

View File

@@ -266,7 +266,7 @@ namespace ams::ncm {
ON_SCOPE_EXIT { fs::Unmount(root->mount_name); };
/* Ensure the path exists for us to import to. */
R_TRY(fs::EnsureDirectoryRecursively(root->path));
R_TRY(fs::EnsureDirectory(root->path));
/* Copy the file from bis to our save. */
R_TRY(impl::CopyFile(savedata_db_path, bis_db_path));
@@ -395,7 +395,7 @@ namespace ams::ncm {
ON_SCOPE_EXIT { fs::Unmount(root->mount_name); };
/* Ensure the content storage root's path exists. */
R_TRY(fs::EnsureDirectoryRecursively(root->path));
R_TRY(fs::EnsureDirectory(root->path));
/* Initialize content and placeholder directories for the root. */
return ContentStorageImpl::InitializeBase(root->path);
@@ -415,7 +415,7 @@ namespace ams::ncm {
ON_SCOPE_EXIT { fs::Unmount(root->mount_name); };
/* Ensure the content meta database root's path exists. */
R_TRY(fs::EnsureDirectoryRecursively(root->path));
R_TRY(fs::EnsureDirectory(root->path));
/* Commit our changes. */
return fs::CommitSaveData(root->mount_name);
@@ -542,7 +542,7 @@ namespace ams::ncm {
/* Mount based on the storage type. */
if (storage_id == StorageId::GameCard) {
fs::GameCardHandle handle;
fs::GameCardHandle handle{};
R_TRY(fs::GetGameCardHandle(std::addressof(handle)));
R_TRY(fs::MountGameCardPartition(root->mount_name, handle, fs::GameCardPartition::Secure));
} else {