diff options
author | Sam Bingner <sam@bingner.com> | 2018-10-15 15:00:44 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2018-10-15 15:38:07 -1000 |
commit | 89afe2061e0fc081bdacc8cb298a460b8a612ecb (patch) | |
tree | cc3b280ef100155684b83a9f2bf4a845fd6b18ec /Sources.mm | |
parent | ee5fa6a9e4cf85553bc7ad2511ca3b6a18c32dfa (diff) |
Refuse to load electra reposv1.1.32%b4
Diffstat (limited to 'Sources.mm')
-rw-r--r-- | Sources.mm | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -51,6 +51,10 @@ void CydiaWriteSources() { if ([[source objectForKey:@"URI"] hasPrefix:@"http://apt.bingner.com"] || [[source objectForKey:@"URI"] hasPrefix:@"https://apt.bingner.com"]) continue; + // Don't add Electra sources + if ([[source objectForKey:@"URI"] rangeOfString:@"electra" options:NSCaseInsensitiveSearch].location != NSNotFound) + continue; + NSArray *sections([source objectForKey:@"Sections"] ?: [NSArray array]); fprintf(file, "%s %s %s%s%s\n", @@ -66,6 +70,14 @@ void CydiaWriteSources() { } void CydiaAddSource(NSDictionary *source) { + // Ignore it if main source is added again + if ([[source objectForKey:@"URI"] hasPrefix:@"http://apt.bingner.com"] || [[source objectForKey:@"URI"] hasPrefix:@"https://apt.bingner.com"]) + return; + + // Don't add Electra sources + if ([[source objectForKey:@"URI"] rangeOfString:@"electra" options:NSCaseInsensitiveSearch].location != NSNotFound) + return; + [Sources_ setObject:source forKey:[NSString stringWithFormat:@"%@:%@:%@", [source objectForKey:@"Type"], [source objectForKey:@"URI"], [source objectForKey:@"Distribution"]]]; } |