mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-13 13:35:14 +01:00
Services/AM: Detect encrypted CIAs
This commit is contained in:
parent
c0eb233bf1
commit
70ff3c72f1
@ -297,6 +297,14 @@ InstallStatus InstallCIA(const std::string& path,
|
|||||||
Service::AM::CIAFile installFile(
|
Service::AM::CIAFile installFile(
|
||||||
Service::AM::GetTitleMediaType(container.GetTitleMetadata().GetTitleID()));
|
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");
|
FileUtil::IOFile file(path, "rb");
|
||||||
if (!file.IsOpen())
|
if (!file.IsOpen())
|
||||||
return InstallStatus::ErrorFailedToOpenFile;
|
return InstallStatus::ErrorFailedToOpenFile;
|
||||||
|
Loading…
Reference in New Issue
Block a user