diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index b677ef6b4..da6acdd80 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -297,6 +297,14 @@ InstallStatus InstallCIA(const std::string& path, Service::AM::CIAFile installFile( Service::AM::GetTitleMediaType(container.GetTitleMetadata().GetTitleID())); + for (size_t i = 0; i < container.GetTitleMetadata().GetContentCount(); i++) { + if (container.GetTitleMetadata().GetContentTypeByIndex(i) & + FileSys::TMDContentTypeFlag::Encrypted) { + LOG_ERROR(Service_AM, "File %s is encrypted! Aborting...", path.c_str()); + return InstallStatus::ErrorEncrypted; + } + } + FileUtil::IOFile file(path, "rb"); if (!file.IsOpen()) return InstallStatus::ErrorFailedToOpenFile;