From 93ef74bb87c6be4e4e00399af519d24630653712 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 20 Mar 2011 17:50:00 -0700 Subject: Don't use HTTP disk cache on < 3.2. --- MobileCydia.mm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'MobileCydia.mm') diff --git a/MobileCydia.mm b/MobileCydia.mm index 2b16ee2..3e1b684 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -9739,11 +9739,13 @@ _trace(); [BridgedHosts_ addObject:[[NSURL URLWithString:CydiaURL(@"")] host]]; } - [NSURLCache setSharedURLCache:[[[CYURLCache alloc] - initWithMemoryCapacity:524288 - diskCapacity:10485760 - diskPath:[NSString stringWithFormat:@"%@/Library/Caches/com.saurik.Cydia/SDURLCache", @"/var/root"] - ] autorelease]]; + // on 3.[01], CFURLCacheResponse is backed by NSURLCacheResponse, and vice versa: fail + if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iPhoneOS_3_2) + [NSURLCache setSharedURLCache:[[[CYURLCache alloc] + initWithMemoryCapacity:524288 + diskCapacity:10485760 + diskPath:[NSString stringWithFormat:@"%@/Library/Caches/com.saurik.Cydia/SDURLCache", @"/var/root"] + ] autorelease]]; [CydiaWebViewController _initialize]; -- cgit v1.2.3