summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-03-20 17:50:00 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-20 17:51:10 -0700
commit93ef74bb87c6be4e4e00399af519d24630653712 (patch)
treee2af10eb98a7b639de506fa49601de7f48b5e715 /MobileCydia.mm
parent665d1e624319516779b875d3e58196f866b16649 (diff)
Don't use HTTP disk cache on < 3.2.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm12
1 files changed, 7 insertions, 5 deletions
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];