From: Jay Freeman (saurik) Date: Wed, 5 Nov 2014 11:20:57 +0000 (-0800) Subject: Restart SpringBoard in the case that we MoveStash. X-Git-Tag: v1.1.16~3 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/5530e23458e832a9840ce6f0182f1ebdb7c9021b Restart SpringBoard in the case that we MoveStash. --- diff --git a/postinst.mm b/postinst.mm index e5658d2a..b380d644 100644 --- a/postinst.mm +++ b/postinst.mm @@ -79,11 +79,6 @@ static bool FixProtections() { } } - if (!MoveStash()) { - fprintf(stderr, "failed to move stash\n"); - return false; - } - return true; } @@ -188,9 +183,18 @@ int main(int argc, const char *argv[]) { NSAutoreleasePool *pool([[NSAutoreleasePool alloc] init]); - if (kCFCoreFoundationVersionNumber >= 1000) + bool restart(false); + + if (kCFCoreFoundationVersionNumber >= 1000) { if (!FixProtections()) return 1; + if (MoveStash()) + restart = true; + else { + fprintf(stderr, "failed to move stash\n"); + return 1; + } + } size_t size; sysctlbyname("kern.osversion", NULL, &size, NULL, 0); @@ -249,7 +253,9 @@ int main(int argc, const char *argv[]) { FixPermissions(); - if (FixApplications()) + restart |= FixApplications(); + + if (restart) Finish("restart"); [pool release];