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);
debug::DebugLog("Deleting %s\n", placeholder_path);
R_TRY_CATCH(fsdevDeleteDirectoryRecursively(placeholder_path)) {
R_CATCH(ResultFsPathNotFound) {
return ResultNcmPlaceHolderNotFound;
}
} R_END_TRY_CATCH;
if (std::remove(placeholder_path) != 0) {
R_TRY_CATCH(fsdevGetLastResult()) {
R_CATCH(ResultFsPathNotFound) {
return ResultNcmPlaceHolderNotFound;
}
} R_END_TRY_CATCH;
}
return ResultSuccess;
}

View file

@ -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)) {
R_CATCH(ResultFsPathNotFound) {
return ResultNcmContentNotFound;
}
} R_END_TRY_CATCH;
if (std::remove(content_path) != 0) {
R_TRY_CATCH(fsdevGetLastResult()) {
R_CATCH(ResultFsPathNotFound) {
return ResultNcmContentNotFound;
}
} R_END_TRY_CATCH;
}
return ResultSuccess;
R_DEBUG_END