summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2014-10-30 11:23:02 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2014-10-30 11:23:02 -0700
commit6c9fe9af90066de7d36a1f221d714f0889fc328f (patch)
tree4c92256f6b936c5c35d687cb1a3d966442383590 /MobileCydia.mm
parenta4a93d599b06516cc112ca683409db0dc619600d (diff)
Don't rely on postinst to setnsfpn /var lib/cache.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm4
1 files changed, 4 insertions, 0 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index ab00331..d58be24 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -10505,6 +10505,10 @@ int main(int argc, char *argv[]) {
/*if (substrate && access("/Library/MobileSubstrate/MobileSubstrate.dylib", F_OK) == 0)
dlopen("/Library/MobileSubstrate/MobileSubstrate.dylib", RTLD_LAZY | RTLD_GLOBAL);*/
+ if (kCFCoreFoundationVersionNumber > 1000)
+ for (const char *path : (const char *[]) {"/var/lib", "/var/cache"})
+ _root(system([[NSString stringWithFormat:@"/usr/libexec/cydia/setnsfpn %s", path] UTF8String]));
+
int version([[NSString stringWithContentsOfFile:@"/var/lib/cydia/firmware.ver"] intValue]);
if (access("/User", F_OK) != 0 || version != 6) {