diff options
author | Grant Paul <chpwn@chpwn.com> | 2011-01-30 23:42:16 -0800 |
---|---|---|
committer | Grant Paul <chpwn@chpwn.com> | 2011-01-30 23:42:16 -0800 |
commit | 106d645f5846b972245285e9d075b11be88f8de8 (patch) | |
tree | d28886d37759e26f189e23411da5e86cbdec6bc5 /MobileCydia.mm | |
parent | f70ea8991859d6fe70cc14696fa5e0dfc512ed66 (diff) |
Fix stupidness introduced by last commit; correctly fix cydia://url/* URLs.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 1596c38..2e7abad 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -8745,9 +8745,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { CYViewController *controller = nil; if ([base isEqualToString:@"url"]) { + // This kind of URL can contain slashes in the argument, so we can't parse them below. + NSString *destination = [[url absoluteString] substringFromIndex:([scheme length] + [@"://" length] + [base length] + [@"/" length])]; controller = [[[CYBrowserController alloc] init] autorelease]; - NSArray *arguments([components subarrayWithRange:NSMakeRange(1, [components count] - 1)]); - [(CYBrowserController *)controller loadURL:[NSURL URLWithString:[arguments componentsJoinedByString:@""]]]; + [(CYBrowserController *)controller loadURL:[NSURL URLWithString:destination]]; } else if ([components count] == 1) { if ([base isEqualToString:@"storage"]) { controller = [[[CYBrowserController alloc] init] autorelease]; |