Fixed placeholder/content deletion

This commit is contained in:
Adubbz 2019-08-04 22:33:15 +10:00
parent ef28b7d395
commit 9e9987a673
2 changed files with 14 additions and 14 deletions

View file

@ -80,13 +80,13 @@ namespace sts::ncm::impl {
this->GetPlaceHolderPathUncached(placeholder_path, placeholder_id); this->GetPlaceHolderPathUncached(placeholder_path, placeholder_id);
debug::DebugLog("Deleting %s\n", placeholder_path); if (std::remove(placeholder_path) != 0) {
R_TRY_CATCH(fsdevGetLastResult()) {
R_TRY_CATCH(fsdevDeleteDirectoryRecursively(placeholder_path)) { R_CATCH(ResultFsPathNotFound) {
R_CATCH(ResultFsPathNotFound) { return ResultNcmPlaceHolderNotFound;
return ResultNcmPlaceHolderNotFound; }
} } R_END_TRY_CATCH;
} R_END_TRY_CATCH; }
return ResultSuccess; return ResultSuccess;
} }

View file

@ -223,16 +223,16 @@ namespace sts::ncm {
} }
this->ClearContentCache(); this->ClearContentCache();
char content_path[FS_MAX_PATH] = {0}; char content_path[FS_MAX_PATH] = {0};
this->GetContentPath(content_path, content_id); this->GetContentPath(content_path, content_id);
R_TRY_CATCH(fsdevDeleteDirectoryRecursively(content_path)) { if (std::remove(content_path) != 0) {
R_CATCH(ResultFsPathNotFound) { R_TRY_CATCH(fsdevGetLastResult()) {
return ResultNcmContentNotFound; R_CATCH(ResultFsPathNotFound) {
} return ResultNcmContentNotFound;
} R_END_TRY_CATCH; }
} R_END_TRY_CATCH;
}
return ResultSuccess; return ResultSuccess;
R_DEBUG_END R_DEBUG_END