]> git.saurik.com Git - cydia.git/commitdiff
Fix SourceController state saving.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 11 Mar 2011 01:06:06 +0000 (17:06 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 11 Mar 2011 01:06:06 +0000 (17:06 -0800)
MobileCydia.mm

index 758e66224a6b5555343912ec2d1d6c683f05dcf9..c3ac471fecb190985d89eb2c1926ccdd4c44a022 100644 (file)
@@ -8058,7 +8058,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 @implementation SourceController
 
 - (NSURL *) navigationURL {
-    return [NSURL URLWithString:[NSString stringWithFormat:@"cydia://sources/%@", [source_ name]]];
+    return [NSURL URLWithString:[NSString stringWithFormat:@"cydia://sources/%@", [key_ stringByAddingPercentEscapesIncludingReserved]]];
 }
 
 - (id) initWithDatabase:(Database *)database source:(Source *)source {
@@ -9485,7 +9485,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
                 controller = [[[SourcesController alloc] initWithDatabase:database_] autorelease];
                 [(SourcesController *)controller showAddSourcePrompt];
             } else {
-                Source *source = [database_ sourceWithKey:argument];
+                Source *source = [database_ sourceWithKey:[argument stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
                 controller = [[[SourceController alloc] initWithDatabase:database_ source:source] autorelease];
             }
         }