Prevent automatic placeholder creation on open

This commit is contained in:
Adubbz 2019-08-06 14:13:15 +10:00
parent f080f6793b
commit 6e5c0bde51
7 changed files with 55 additions and 24 deletions

View file

@ -224,14 +224,12 @@ namespace sts::ncm {
path::GetContentMetaPath(content_path, content_id, this->make_content_path_func, this->root_path);
}
FILE* f = fopen(content_path, "rb");
FILE* f = nullptr;
R_TRY(OpenFile(&f, content_path, FS_OPEN_READ));
ON_SCOPE_EXIT {
fclose(f);
};
if (f == nullptr) {
return fsdevGetLastResult();
}
if (fseek(f, offset, SEEK_SET) != 0) {
return fsdevGetLastResult();