|
|
|
@ -35,7 +35,24 @@ NSString* configPath = @"/Library/Application Support/pEp/Updater";
|
|
|
|
|
NSString *configFile;
|
|
|
|
|
while (dirEnum && (configFile = [dirEnum nextObject])) {
|
|
|
|
|
if ([[configFile pathExtension] isEqualToString: @"plist"]) {
|
|
|
|
|
|
|
|
|
|
[self updateWithFile:configFile];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-(void)updateWithFile:(NSString*)configFile
|
|
|
|
|
{
|
|
|
|
|
NSInputStream *is = [NSInputStream inputStreamWithFileAtPath:configFile];
|
|
|
|
|
if (is) {
|
|
|
|
|
NSError* err = nil;
|
|
|
|
|
NSDictionary* plist = [NSPropertyListSerialization propertyListWithStream:is options:NSPropertyListImmutable format:nil error:&err];
|
|
|
|
|
if (plist) {
|
|
|
|
|
NSString* name = [plist objectForKey:@"name"];
|
|
|
|
|
NSString* url = [plist objectForKey:@"url"];
|
|
|
|
|
[self update:name usingUrl:url];
|
|
|
|
|
}
|
|
|
|
|
else if (err){
|
|
|
|
|
NSLog(@"pEpMacOSAdapter: %@ %@ %@ %@", err.localizedDescription, err.localizedFailureReason, err.localizedRecoveryOptions, err.localizedRecoverySuggestion);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|