creport: use fs bindings

This commit is contained in:
Michael Scire
2020-03-08 01:45:12 -08:00
parent c703be86fc
commit 40c6733de3
24 changed files with 391 additions and 243 deletions

View File

@@ -260,7 +260,7 @@ namespace ams::ncm {
ON_SCOPE_EXIT { fs::Unmount(root->mount_name); };
/* Ensure the path exists for us to import to. */
R_TRY(impl::EnsureDirectoryRecursively(root->path));
R_TRY(fs::EnsureDirectoryRecursively(root->path));
/* Copy the file from bis to our save. */
R_TRY(impl::CopyFile(savedata_db_path, bis_db_path));
@@ -389,7 +389,7 @@ namespace ams::ncm {
ON_SCOPE_EXIT { fs::Unmount(root->mount_name); };
/* Ensure the content storage root's path exists. */
R_TRY(impl::EnsureDirectoryRecursively(root->path));
R_TRY(fs::EnsureDirectoryRecursively(root->path));
/* Initialize content and placeholder directories for the root. */
return ContentStorageImpl::InitializeBase(root->path);
@@ -409,7 +409,7 @@ namespace ams::ncm {
ON_SCOPE_EXIT { fs::Unmount(root->mount_name); };
/* Ensure the content meta database root's path exists. */
R_TRY(impl::EnsureDirectoryRecursively(root->path));
R_TRY(fs::EnsureDirectoryRecursively(root->path));
/* Commit our changes. */
return fs::CommitSaveData(root->mount_name);
@@ -454,7 +454,7 @@ namespace ams::ncm {
/* Ensure the root path exists. */
bool has_dir = false;
R_TRY(impl::HasDirectory(&has_dir, root->path));
R_TRY(fs::HasDirectory(&has_dir, root->path));
R_UNLESS(has_dir, ncm::ResultInvalidContentMetaDatabase());
return ResultSuccess();