summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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];