diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2014-06-12 02:50:38 -0700 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2014-06-12 02:50:38 -0700 |
commit | 2e007a7245541ef16becc57493fa6159f2059ca4 (patch) | |
tree | 23946566f7033f4732c5475ad495bf962177a0e6 | |
parent | ffb4fe6a8c3660e649b6fd38829f92d29200f70c (diff) |
Do not restart SpringBoard if symlink is damaged.
-rw-r--r-- | postinst.mm | 9 |
1 files 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; } } |