]> git.saurik.com Git - uikittools.git/commitdiff
Only attempt Weather app fix if caching Container. v1.1.5
authorJay Freeman (saurik) <saurik@saurik.com>
Wed, 6 Feb 2013 12:04:22 +0000 (12:04 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Wed, 6 Feb 2013 12:04:26 +0000 (12:04 +0000)
extrainst_.mm

index 5a473b3e0befe063b72e101f325b58938900d268..2554c0e3f3db3710ef0066214bef7320405445bf 100644 (file)
@@ -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];