From: Jay Freeman (saurik) Date: Thu, 4 Dec 2014 08:54:35 +0000 (-0800) Subject: Move double-theme protection into bundleWithFile:. X-Git-Tag: v0.9.3918~3 X-Git-Url: https://git.saurik.com/winterboard.git/commitdiff_plain/38efdc42fa081d994ccb3dfdb0f506895c1e00d1 Move double-theme protection into bundleWithFile:. --- diff --git a/Library.mm b/Library.mm index 3372ddd..016eaca 100644 --- a/Library.mm +++ b/Library.mm @@ -492,7 +492,7 @@ static NSString *$pathForIcon$(SBApplication *self, NSString *suffix = @"") { @implementation NSBundle (WinterBoard) -+ (NSBundle *) wb$bundleWithFile:(NSString *)path { ++ (NSBundle *) _wb$bundleWithFile:(NSString *)path { path = [path stringByDeletingLastPathComponent]; if (path == nil || [path length] == 0 || [path isEqualToString:@"/"]) return nil; @@ -508,7 +508,7 @@ static NSString *$pathForIcon$(SBApplication *self, NSString *suffix = @"") { if ([Manager_ fileExistsAtPath:[path stringByAppendingPathComponent:@"Info.plist"]]) bundle = [NSBundle bundleWithPath:path]; if (bundle == nil) - bundle = [NSBundle wb$bundleWithFile:path]; + bundle = [NSBundle _wb$bundleWithFile:path]; if (Debug_) NSLog(@"WB:Debug:PathBundle(%@, %@)", path, bundle); @@ -520,6 +520,12 @@ static NSString *$pathForIcon$(SBApplication *self, NSString *suffix = @"") { return bundle; } ++ (NSBundle *) wb$bundleWithFile:(NSString *)path { + if ([path hasPrefix:@"/Library/Themes"]) + return nil; + return [self _wb$bundleWithFile:path]; +} + @end // }}} // -[NSString wb$themedPath] {{{ @@ -530,9 +536,6 @@ static NSString *$pathForIcon$(SBApplication *self, NSString *suffix = @"") { @implementation NSString (WinterBoard) - (NSString *) wb$themedPath { - if ([self hasPrefix:@"/Library/Themes/"]) - return self; - if (Debug_) NSLog(@"WB:Debug:Bypass(\"%@\")", self);