mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-14 17:16:36 +00:00
Fixed placeholder/content deletion
This commit is contained in:
parent
ef28b7d395
commit
9e9987a673
2 changed files with 14 additions and 14 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue