]> git.saurik.com Git - cydia.git/commitdiff
Use our Cydia cache folder for WebKit LocalStorage.
authorJay Freeman (saurik) <saurik@saurik.com>
Wed, 7 Mar 2012 06:57:26 +0000 (22:57 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Wed, 7 Mar 2012 07:34:08 +0000 (23:34 -0800)
MobileCydia.mm

index 2c94da82a42e88554aa3a49078ac19cc569f48ba..6f26c87ebd0835cff7a700e5ff9b4c33daf946e7 100644 (file)
@@ -260,6 +260,8 @@ NSString *Elision_;
 static NSString *Error_;
 static NSString *Warning_;
 
+static NSString *Cache_;
+
 static bool AprilFools_;
 
 static void (*$SBSSetInterceptsMenuButtonForever)(bool);
@@ -10183,7 +10185,7 @@ _trace();
     [NSURLCache setSharedURLCache:[[[CYURLCache alloc]
         initWithMemoryCapacity:524288
         diskCapacity:10485760
-        diskPath:[NSString stringWithFormat:@"%@/Library/Caches/com.saurik.Cydia/SDURLCache", @"/var/root"]
+        diskPath:[NSString stringWithFormat:@"%@/SDURLCache", Cache_]
     ] autorelease]];
 
     [CydiaWebViewController _initialize];
@@ -10636,6 +10638,8 @@ int main(int argc, char *argv[]) {
     if (access("/var/mobile/Library/Keyboard/UserDictionary.sqlite", F_OK) == 0)
         system("mkdir -p /var/root/Library/Keyboard; cp -af /var/mobile/Library/Keyboard/UserDictionary.sqlite /var/root/Library/Keyboard/");
 
+    Cache_ = [[NSString stringWithFormat:@"%@/Library/Caches/com.saurik.Cydia", @"/var/root"] retain];
+
     /*Method alloc = class_getClassMethod([NSObject class], @selector(alloc));
     alloc_ = alloc->method_imp;
     alloc->method_imp = (IMP) &Alloc_;*/