From d1c7f1fd95448c4e6aee4ff164f7ff47f5d41255 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 6 Mar 2012 22:57:26 -0800 Subject: [PATCH] Use our Cydia cache folder for WebKit LocalStorage. --- MobileCydia.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index 2c94da82..6f26c87e 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -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_;*/ -- 2.45.2