From 7f9e55ed1a0297c7fd41c333438cccbd2115195c Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 6 Feb 2013 12:04:22 +0000 Subject: Only attempt Weather app fix if caching Container. --- extrainst_.mm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/extrainst_.mm b/extrainst_.mm index 5a473b3..2554c0e 100644 --- a/extrainst_.mm +++ b/extrainst_.mm @@ -133,14 +133,17 @@ int main(int argc, const char *argv[]) { if (kCFCoreFoundationVersionNumber >= 700) { // XXX: iOS 6.x NSString *home(@"/var/mobile"); NSString *plist([NSString stringWithFormat:@"%@/Library/Caches/com.apple.mobile.installation.plist", home]); - NSDictionary *cache([NSDictionary dictionaryWithContentsOfFile:plist]); - NSObject *system([cache objectForKey:@"System"]); - NSDictionary *dictionary([system dictionaryOfInfoDictionaries]); - NSDictionary *weather([dictionary objectForKey:@"com.apple.weather"]); - if (weather != nil && [weather objectForKey:@"Container"] == nil) - FixCache(home, plist); + NSArray *cached([cache objectForKey:@"MICachedKeys"]); + if (cached != nil && [cached containsObject:@"Container"]) { + NSObject *system([cache objectForKey:@"System"]); + NSDictionary *dictionary([system dictionaryOfInfoDictionaries]); + NSDictionary *weather([dictionary objectForKey:@"com.apple.weather"]); + + if (weather != nil && [weather objectForKey:@"Container"] == nil) + FixCache(home, plist); + } } [pool release]; -- cgit v1.2.3