diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2013-02-06 10:08:17 +0000 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2013-02-06 10:12:47 +0000 |
commit | 22d64ef459e18eaf0271f213978680d198318a55 (patch) | |
tree | c8a2d3533351aa3a888cebb471f9cb7d018f2aaf | |
parent | 4ab9b1c71900d5516424dcaf8b0dcb329d5a839f (diff) |
Move error case to before main code.
-rw-r--r-- | uicache.mm | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -106,8 +106,10 @@ int main(int argc, const char *argv[]) { NSMutableDictionary *bundles([NSMutableDictionary dictionaryWithCapacity:16]); id system = [cache objectForKey:@"System"]; - if (system == nil) - goto error; + if (system == nil) { error: + fprintf(stderr, "%s\n", error == nil ? strerror(errno) : [[error localizedDescription] UTF8String]); + goto cached; + } [system removeAllObjects]; @@ -147,10 +149,8 @@ int main(int argc, const char *argv[]) { [workspace registerApplication:[NSURL fileURLWithPath:path]]; } } - - if (false) error: - fprintf(stderr, "%s\n", error == nil ? strerror(errno) : [[error localizedDescription] UTF8String]); } else fprintf(stderr, "cannot open cache file. incorrect user?\n"); + cached: if (respring || kCFCoreFoundationVersionNumber >= 550.32) { unlink([[NSString stringWithFormat:@"%@/Library/Caches/com.apple.springboard-imagecache-icons", home] UTF8String]); |