fixed #523 refactoring regression

This commit is contained in:
michael starke
2016-12-20 09:42:40 +01:00
parent 08d11f1213
commit 6ced97a642
2 changed files with 3 additions and 3 deletions

View File

@@ -96,7 +96,7 @@ FOUNDATION_EXPORT NSString *const MPDocumentGroupKey;
@property (nonatomic, copy) MPEntrySearchContext *searchContext; @property (nonatomic, copy) MPEntrySearchContext *searchContext;
@property (nonatomic, strong, readonly) NSArray *searchResult; @property (nonatomic, strong, readonly) NSArray *searchResult;
+ (KPKDatabaseFormat)versionForFileType:(NSString *)fileType; + (KPKDatabaseFormat)formatForFileType:(NSString *)fileType;
+ (NSString *)fileTypeForVersion:(KPKDatabaseFormat)format; + (NSString *)fileTypeForVersion:(KPKDatabaseFormat)format;
#pragma mark Lock/Decrypt #pragma mark Lock/Decrypt

View File

@@ -182,7 +182,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou
return nil; // Saving without a password/key is not possible return nil; // Saving without a password/key is not possible
} }
NSString *fileType = self.fileTypeFromLastRunSavePanel; NSString *fileType = self.fileTypeFromLastRunSavePanel;
KPKDatabaseFormat format = [self.class versionForFileType:fileType]; KPKDatabaseFormat format = [self.class formatForFileType:fileType];
if(format == KPKDatabaseFormatUnknown) { if(format == KPKDatabaseFormatUnknown) {
if(outError != NULL) { if(outError != NULL) {
NSDictionary *userInfo = @{ NSLocalizedDescriptionKey: NSLocalizedString(@"UNKNOWN_FILE_VERSION", "") }; NSDictionary *userInfo = @{ NSLocalizedDescriptionKey: NSLocalizedString(@"UNKNOWN_FILE_VERSION", "") };
@@ -409,7 +409,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou
#pragma mark Properties #pragma mark Properties
- (KPKDatabaseFormat)formatForFileType { - (KPKDatabaseFormat)formatForFileType {
return [self.class versionForFileType:self.fileType]; return [self.class formatForFileType:self.fileType];
} }
- (BOOL)encrypted { - (BOOL)encrypted {