summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorGrant Paul <chpwn@chpwn.com>2011-01-30 23:31:59 -0800
committerGrant Paul <chpwn@chpwn.com>2011-01-30 23:31:59 -0800
commitf70ea8991859d6fe70cc14696fa5e0dfc512ed66 (patch)
treebaa3b4fd0da21afa2745b9d33fa58c4ce311506a /MobileCydia.mm
parent20fd0049ccbe0fba9fee79b4a546bd71ffb55107 (diff)
Fix cydia://url/ links when they include a slash.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm11
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;