From 2e007a7245541ef16becc57493fa6159f2059ca4 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Thu, 12 Jun 2014 02:50:38 -0700 Subject: Do not restart SpringBoard if symlink is damaged. --- postinst.mm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/postinst.mm b/postinst.mm index a296943..a326911 100644 --- a/postinst.mm +++ b/postinst.mm @@ -71,14 +71,19 @@ static bool FixApplications() { fprintf(stderr, "/Applications damaged -- DO NOT REBOOT\n"); goto undo; } else { - if (symlink(destiny, APPLICATIONS) == -1) + bool success; + if (symlink(destiny, APPLICATIONS) != -1) + success = true; + else { fprintf(stderr, "/var/stash/Applications damaged -- DO NOT REBOOT\n"); + success = false; + } // unneccessary, but feels better (I'm nervous) symlink(destiny, target); [@APPLICATIONS writeToFile:[NSString stringWithFormat:@"%s.lnk", temp] atomically:YES encoding:NSNonLossyASCIIStringEncoding error:NULL]; - return true; + return success; } } -- cgit v1.2.3