diff options
-rw-r--r-- | postinst.mm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/postinst.mm b/postinst.mm index 55739e0..c67cce5 100644 --- a/postinst.mm +++ b/postinst.mm @@ -24,10 +24,14 @@ void Finish(const char *finish) { fclose(fout); } +static bool setnsfpn(const char *path) { + return system([[NSString stringWithFormat:@"/usr/libexec/cydia/setnsfpn %s", path] UTF8String]) == 0; +} + static bool FixProtections() { for (const char *path : (const char *[]) {"/var/lib", "/var/cache", "/var/stash"}) { mkdir(path, 0755); - if (system([[NSString stringWithFormat:@"/usr/libexec/cydia/setnsfpn %s", path] UTF8String]) != 0) { + if (!setnsfpn(path)) { fprintf(stderr, "failed to setnsfpn %s\n", path); return false; } |