mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-11 06:38:03 -05:00
Merge pull request #6319 from Morph1984/no-install-base
main: Prevent installing base titles into NAND
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
#include "common/logging/log.h"
|
||||
#include "core/crypto/key_manager.h"
|
||||
#include "core/file_sys/card_image.h"
|
||||
#include "core/file_sys/common_funcs.h"
|
||||
#include "core/file_sys/content_archive.h"
|
||||
#include "core/file_sys/nca_metadata.h"
|
||||
#include "core/file_sys/registered_cache.h"
|
||||
@ -592,6 +593,12 @@ InstallResult RegisteredCache::InstallEntry(const NSP& nsp, bool overwrite_if_ex
|
||||
const CNMT cnmt(cnmt_file);
|
||||
|
||||
const auto title_id = cnmt.GetTitleID();
|
||||
const auto version = cnmt.GetTitleVersion();
|
||||
|
||||
if (title_id == GetBaseTitleID(title_id) && version == 0) {
|
||||
return InstallResult::ErrorBaseInstall;
|
||||
}
|
||||
|
||||
const auto result = RemoveExistingEntry(title_id);
|
||||
|
||||
// Install Metadata File
|
||||
|
@ -38,6 +38,7 @@ enum class InstallResult {
|
||||
ErrorAlreadyExists,
|
||||
ErrorCopyFailed,
|
||||
ErrorMetaFailed,
|
||||
ErrorBaseInstall,
|
||||
};
|
||||
|
||||
struct ContentProviderEntry {
|
||||
|
Reference in New Issue
Block a user