diff options
author | Grant Paul <chpwn@chpwn.com> | 2011-01-30 23:31:59 -0800 |
---|---|---|
committer | Grant Paul <chpwn@chpwn.com> | 2011-01-30 23:31:59 -0800 |
commit | f70ea8991859d6fe70cc14696fa5e0dfc512ed66 (patch) | |
tree | baa3b4fd0da21afa2745b9d33fa58c4ce311506a | |
parent | 20fd0049ccbe0fba9fee79b4a546bd71ffb55107 (diff) |
Fix cydia://url/ links when they include a slash.
-rw-r--r-- | MobileCydia.mm | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 0076c42..1596c38 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -8744,7 +8744,11 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { CYViewController *controller = nil; - if ([components count] == 1) { + if ([base isEqualToString:@"url"]) { + controller = [[[CYBrowserController alloc] init] autorelease]; + NSArray *arguments([components subarrayWithRange:NSMakeRange(1, [components count] - 1)]); + [(CYBrowserController *)controller loadURL:[NSURL URLWithString:[arguments componentsJoinedByString:@""]]]; + } else if ([components count] == 1) { if ([base isEqualToString:@"storage"]) { controller = [[[CYBrowserController alloc] init] autorelease]; [(CYBrowserController *)controller loadURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"storage" ofType:@"html"]]]; @@ -8800,11 +8804,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } } - if ([base isEqualToString:@"url"]) { - controller = [[[CYBrowserController alloc] init] autorelease]; - [(CYBrowserController *)controller loadURL:[NSURL URLWithString:argument]]; - } - if ([base isEqualToString:@"launch"]) { [self launchApplicationWithIdentifier:argument suspended:NO]; return nil; |