diff options
Diffstat (limited to 'src/core/file_sys')
| -rw-r--r-- | src/core/file_sys/registered_cache.cpp | 7 | ||||
| -rw-r--r-- | src/core/file_sys/registered_cache.h | 1 |
2 files changed, 8 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 @@ | |||
| 12 | #include "common/logging/log.h" | 12 | #include "common/logging/log.h" |
| 13 | #include "core/crypto/key_manager.h" | 13 | #include "core/crypto/key_manager.h" |
| 14 | #include "core/file_sys/card_image.h" | 14 | #include "core/file_sys/card_image.h" |
| 15 | #include "core/file_sys/common_funcs.h" | ||
| 15 | #include "core/file_sys/content_archive.h" | 16 | #include "core/file_sys/content_archive.h" |
| 16 | #include "core/file_sys/nca_metadata.h" | 17 | #include "core/file_sys/nca_metadata.h" |
| 17 | #include "core/file_sys/registered_cache.h" | 18 | #include "core/file_sys/registered_cache.h" |
| @@ -592,6 +593,12 @@ InstallResult RegisteredCache::InstallEntry(const NSP& nsp, bool overwrite_if_ex | |||
| 592 | const CNMT cnmt(cnmt_file); | 593 | const CNMT cnmt(cnmt_file); |
| 593 | 594 | ||
| 594 | const auto title_id = cnmt.GetTitleID(); | 595 | const auto title_id = cnmt.GetTitleID(); |
| 596 | const auto version = cnmt.GetTitleVersion(); | ||
| 597 | |||
| 598 | if (title_id == GetBaseTitleID(title_id) && version == 0) { | ||
| 599 | return InstallResult::ErrorBaseInstall; | ||
| 600 | } | ||
| 601 | |||
| 595 | const auto result = RemoveExistingEntry(title_id); | 602 | const auto result = RemoveExistingEntry(title_id); |
| 596 | 603 | ||
| 597 | // Install Metadata File | 604 | // Install Metadata File |
diff --git a/src/core/file_sys/registered_cache.h b/src/core/file_sys/registered_cache.h index b31630014..d042aef90 100644 --- a/src/core/file_sys/registered_cache.h +++ b/src/core/file_sys/registered_cache.h | |||
| @@ -38,6 +38,7 @@ enum class InstallResult { | |||
| 38 | ErrorAlreadyExists, | 38 | ErrorAlreadyExists, |
| 39 | ErrorCopyFailed, | 39 | ErrorCopyFailed, |
| 40 | ErrorMetaFailed, | 40 | ErrorMetaFailed, |
| 41 | ErrorBaseInstall, | ||
| 41 | }; | 42 | }; |
| 42 | 43 | ||
| 43 | struct ContentProviderEntry { | 44 | struct ContentProviderEntry { |