diff --git a/stratosphere/ncm/source/impl/ncm_placeholder_accessor.cpp b/stratosphere/ncm/source/impl/ncm_placeholder_accessor.cpp index c3236a4c8..311fbc112 100644 --- a/stratosphere/ncm/source/impl/ncm_placeholder_accessor.cpp +++ b/stratosphere/ncm/source/impl/ncm_placeholder_accessor.cpp @@ -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; } diff --git a/stratosphere/ncm/source/ncm_contentstorage.cpp b/stratosphere/ncm/source/ncm_contentstorage.cpp index 9e1599599..0c8ad80c2 100644 --- a/stratosphere/ncm/source/ncm_contentstorage.cpp +++ b/stratosphere/ncm/source/ncm_contentstorage.cpp @@ -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