}
}
- if (!MoveStash()) {
- fprintf(stderr, "failed to move stash\n");
- return false;
- }
-
return true;
}
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);
FixPermissions();
- if (FixApplications())
+ restart |= FixApplications();
+
+ if (restart)
Finish("restart");
[pool release];