Fixed placeholder/content deletion

This commit is contained in:
Adubbz committed 2019-08-04 22:33:15 +10:00
1 parent ef28b7d395
commit 9e9987a673
2 files changed
+6 -6

No files matched your search

@@ -80,13 +80,13 @@ namespace sts::ncm::impl {
this->GetPlaceHolderPathUncached(placeholder_path, placeholder_id);
debug::DebugLog("Deleting %s\n", placeholder_path);
R_TRY_CATCH(fsdevDeleteDirectoryRecursively(placeholder_path)) {
if (std::remove(placeholder_path) != 0) {
R_TRY_CATCH(fsdevGetLastResult()) {
R_CATCH(ResultFsPathNotFound) {
return ResultNcmPlaceHolderNotFound;
}
} R_END_TRY_CATCH;
}
return ResultSuccess;
}
@@ -223,16 +223,16 @@ namespace sts::ncm {
}
this->ClearContentCache();
char content_path[FS_MAX_PATH] = {0};
this->GetContentPath(content_path, content_id);
R_TRY_CATCH(fsdevDeleteDirectoryRecursively(content_path)) {
if (std::remove(content_path) != 0) {
R_TRY_CATCH(fsdevGetLastResult()) {
R_CATCH(ResultFsPathNotFound) {
return ResultNcmContentNotFound;
}
} R_END_TRY_CATCH;
}
return ResultSuccess;
R_DEBUG_END