diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2010-11-05 09:16:12 -0700 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2010-11-05 09:16:12 -0700 |
commit | 1671fa4e57bc813f7e0b4423662961d9e55d7d6e (patch) | |
tree | 214b019c6ceab9cc3b1d9ddbbc259a6a14e025ad | |
parent | 2fafd6ebc174dc5b207492941aca4fee38ac1ef3 (diff) |
The Reorganizing text must come after container_ is allocated.
-rw-r--r-- | MobileCydia.mm | 66 |
1 files changed, 32 insertions, 34 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 97cc8c1..8482fe2 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -8557,40 +8557,6 @@ static _finline void _setHomePage(Cydia *self) { database_ = [Database sharedInstance]; - if ( - readlink("/Applications", NULL, 0) == -1 && errno == EINVAL || - readlink("/Library/Ringtones", NULL, 0) == -1 && errno == EINVAL || - readlink("/Library/Wallpaper", NULL, 0) == -1 && errno == EINVAL || - //readlink("/usr/bin", NULL, 0) == -1 && errno == EINVAL || - readlink("/usr/include", NULL, 0) == -1 && errno == EINVAL || - readlink("/usr/lib/pam", NULL, 0) == -1 && errno == EINVAL || - readlink("/usr/libexec", NULL, 0) == -1 && errno == EINVAL || - readlink("/usr/share", NULL, 0) == -1 && errno == EINVAL || - //readlink("/var/lib", NULL, 0) == -1 && errno == EINVAL || - false - ) { - [self setIdleTimerDisabled:YES]; - - hud_ = [self addProgressHUD]; - [hud_ setText:@"Reorganizing:\n\nWill Automatically\nClose When Done"]; - [self setStatusBarShowsProgress:YES]; - - [self yieldToSelector:@selector(system:) withObject:@"/usr/libexec/cydia/free.sh"]; - - [self setStatusBarShowsProgress:NO]; - [self removeProgressHUD:hud_]; - hud_ = nil; - - if (ExecFork() == 0) { - execlp("launchctl", "launchctl", "stop", "com.apple.SpringBoard", NULL); - perror("launchctl stop"); - } - - return; - } - - _trace(); - NSMutableArray *items([NSMutableArray arrayWithObjects: [[[UITabBarItem alloc] initWithTitle:@"Cydia" image:[UIImage applicationImageNamed:@"home.png"] tag:kCydiaTag] autorelease], [[[UITabBarItem alloc] initWithTitle:UCLocalize("SECTIONS") image:[UIImage applicationImageNamed:@"install.png"] tag:kSectionsTag] autorelease], @@ -8623,6 +8589,38 @@ static _finline void _setHomePage(Cydia *self) { [container_ setTabBarController:tabbar_]; [window_ addSubview:[container_ view]]; + if ( + readlink("/Applications", NULL, 0) == -1 && errno == EINVAL || + readlink("/Library/Ringtones", NULL, 0) == -1 && errno == EINVAL || + readlink("/Library/Wallpaper", NULL, 0) == -1 && errno == EINVAL || + //readlink("/usr/bin", NULL, 0) == -1 && errno == EINVAL || + readlink("/usr/include", NULL, 0) == -1 && errno == EINVAL || + readlink("/usr/lib/pam", NULL, 0) == -1 && errno == EINVAL || + readlink("/usr/libexec", NULL, 0) == -1 && errno == EINVAL || + readlink("/usr/share", NULL, 0) == -1 && errno == EINVAL || + //readlink("/var/lib", NULL, 0) == -1 && errno == EINVAL || + false + ) { + [self setIdleTimerDisabled:YES]; + + hud_ = [self addProgressHUD]; + [hud_ setText:@"Reorganizing:\n\nWill Automatically\nClose When Done"]; + [self setStatusBarShowsProgress:YES]; + + [self yieldToSelector:@selector(system:) withObject:@"/usr/libexec/cydia/free.sh"]; + + [self setStatusBarShowsProgress:NO]; + [self removeProgressHUD:hud_]; + hud_ = nil; + + if (ExecFork() == 0) { + execlp("launchctl", "launchctl", "stop", "com.apple.SpringBoard", NULL); + perror("launchctl stop"); + } + + return; + } + [self performSelector:@selector(loadData) withObject:nil afterDelay:0]; } |