@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;
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);
return bundle;
}
++ (NSBundle *) wb$bundleWithFile:(NSString *)path {
+ if ([path hasPrefix:@"/Library/Themes"])
+ return nil;
+ return [self _wb$bundleWithFile:path];
+}
+
@end
// }}}
// -[NSString wb$themedPath] {{{
@implementation NSString (WinterBoard)
- (NSString *) wb$themedPath {
- if ([self hasPrefix:@"/Library/Themes/"])
- return self;
-
if (Debug_)
NSLog(@"WB:Debug:Bypass(\"%@\")", self);