From: Jay Freeman (saurik) <saurik@saurik.com>
Date: Thu, 12 Jun 2014 09:50:38 +0000 (-0700)
Subject: Do not restart SpringBoard if symlink is damaged.
X-Git-Tag: v1.1.10~1
X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/2e007a7245541ef16becc57493fa6159f2059ca4

Do not restart SpringBoard if symlink is damaged.
---

diff --git a/postinst.mm b/postinst.mm
index a2969439..a3269117 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;
     }
 }