mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	Services/AM: Detect encrypted CIAs
This commit is contained in:
		
							parent
							
								
									c0eb233bf1
								
							
						
					
					
						commit
						70ff3c72f1
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		|  | @ -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; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue