mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-24 12:19:52 +00:00
Using KPKDatabaseType instead of KPKVersion.
This commit is contained in:
@@ -17,16 +17,16 @@
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
typeToUTI = @{
|
||||
@(KPKLegacyVersion) : MPLegacyDocumentUTI,
|
||||
@(KPKXmlVersion) : MPXMLDocumentUTI
|
||||
@(KPKDatabaseTypeBinary) : MPLegacyDocumentUTI,
|
||||
@(KPKDatabaseTypeXml) : MPXMLDocumentUTI
|
||||
};
|
||||
});
|
||||
return typeToUTI;
|
||||
}
|
||||
|
||||
- (NSString *)typeForData:(NSData *)data {
|
||||
KPKVersion version = [self databaseVersionForData:data];
|
||||
return [self _typeToUTIdictionary][@(version)];
|
||||
KPKFileInfo fileInfo = [self fileInfoForData:data];
|
||||
return [self _typeToUTIdictionary][@(fileInfo.type)];
|
||||
}
|
||||
|
||||
- (NSString *)typeForContentOfURL:(NSURL *)url {
|
||||
|
||||
Reference in New Issue
Block a user