Metadata: Fixes metadata reading
metadataBlob may be null, so create dictionary in that case. Fixes #360 Signed-off-by: Christopher Snowhill <kode54@gmail.com>main
parent
391b9cf6dc
commit
e0a1cf49e7
|
@ -503,7 +503,13 @@ NSURL *_Nullable urlForPath(NSString *_Nullable path) {
|
|||
self.error = YES;
|
||||
self.errorMessage = NSLocalizedStringFromTableInBundle(@"ErrorMetadata", nil, [NSBundle bundleForClass:[self class]], @"");
|
||||
} else {
|
||||
NSMutableDictionary *metaDict = [self.metadataBlob mutableCopy];
|
||||
NSDictionary *originalDict = (NSDictionary * _Nullable) self.metadataBlob;
|
||||
NSMutableDictionary *metaDict;
|
||||
if(originalDict) {
|
||||
metaDict = [originalDict mutableCopy];
|
||||
} else {
|
||||
metaDict = [[NSMutableDictionary alloc] init];
|
||||
}
|
||||
self.volume = 1;
|
||||
for(NSString *key in metadata) {
|
||||
NSString *lowerKey = [key lowercaseString];
|
||||
|
|
Loading…
Reference in New Issue