summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/registered_cache.cpp
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-05-16 06:24:06 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2021-05-16 10:13:57 +0200
commita170aa16b6d609b5e92b41a64711a2899e457135 (patch)
tree596ef9793d37514343f23f73662327a00a4d002e /src/core/file_sys/registered_cache.cpp
parentMerge pull request #6293 from v1993/master (diff)
downloadyuzu-a170aa16b6d609b5e92b41a64711a2899e457135.tar
yuzu-a170aa16b6d609b5e92b41a64711a2899e457135.tar.gz
yuzu-a170aa16b6d609b5e92b41a64711a2899e457135.tar.bz2
yuzu-a170aa16b6d609b5e92b41a64711a2899e457135.tar.lz
yuzu-a170aa16b6d609b5e92b41a64711a2899e457135.tar.xz
yuzu-a170aa16b6d609b5e92b41a64711a2899e457135.tar.zst
yuzu-a170aa16b6d609b5e92b41a64711a2899e457135.zip
Diffstat (limited to 'src/core/file_sys/registered_cache.cpp')
-rw-r--r--src/core/file_sys/registered_cache.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/file_sys/registered_cache.cpp b/src/core/file_sys/registered_cache.cpp
index 1fb66874e..b0cb65952 100644
--- a/src/core/file_sys/registered_cache.cpp
+++ b/src/core/file_sys/registered_cache.cpp
@@ -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