Various fixes. Note: This contains debug stuff which will be removed later. I was getting tired of having to cherrypick tiny changes

This commit is contained in:
Adubbz 2019-08-04 13:10:45 +10:00
parent b2dd198dc8
commit ef28b7d395
16 changed files with 639 additions and 174 deletions

View file

@ -20,6 +20,8 @@
#include "../ncm_make_path.hpp"
#include "../ncm_path_utils.hpp"
#include "../debug.hpp"
namespace sts::ncm::impl {
unsigned int PlaceHolderAccessor::GetDirectoryDepth() {
@ -78,6 +80,8 @@ 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;
@ -97,6 +101,7 @@ namespace sts::ncm::impl {
FILE* f = fopen(placeholder_path, "r+b");
if (f == nullptr) {
debug::DebugLog("Failed to open placeholder %s\n", placeholder_path);
return fsdevGetLastResult();
}