From 3a686b9fa3139eb401ef9287d5dcee6997b31a08 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 5 Nov 2014 05:09:38 -0800 Subject: We do not actually need to setnsfpn on /var/cache. --- MobileCydia.mm | 3 +-- postinst.mm | 11 +++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index a69d2c7..36c1c62 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -10517,8 +10517,7 @@ int main(int argc, char *argv[]) { 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])); + _root(system([[NSString stringWithFormat:@"/usr/libexec/cydia/setnsfpn /var/lib"] UTF8String])); int version([[NSString stringWithContentsOfFile:@"/var/lib/cydia/firmware.ver"] intValue]); diff --git a/postinst.mm b/postinst.mm index b380d64..11d70dc 100644 --- a/postinst.mm +++ b/postinst.mm @@ -71,12 +71,11 @@ static bool MoveStash() { } static bool FixProtections() { - for (const char *path : (const char *[]) {"/var/lib", "/var/cache"}) { - mkdir(path, 0755); - if (!setnsfpn(path)) { - fprintf(stderr, "failed to setnsfpn %s\n", path); - return false; - } + const char *path("/var/lib"); + mkdir(path, 0755); + if (!setnsfpn(path)) { + fprintf(stderr, "failed to setnsfpn %s\n", path); + return false; } return true; -- cgit v1.2.3