]> git.saurik.com Git - cydia.git/commitdiff
Do not restart SpringBoard if symlink is damaged.
authorJay Freeman (saurik) <saurik@saurik.com>
Thu, 12 Jun 2014 09:50:38 +0000 (02:50 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 12 Jun 2014 09:50:38 +0000 (02:50 -0700)
postinst.mm

index a29694394eb9164ca7484ca6c8b4fee0da8bef1f..a32691179822e94144d9026f110601e93559e213 100644 (file)
@@ -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;
     }
 }