From: Jay Freeman (saurik) Date: Tue, 25 Nov 2014 23:28:01 +0000 (-0800) Subject: Split identifier/folder in $pathForFile$inBundle$. X-Git-Tag: v0.9.3916~17 X-Git-Url: https://git.saurik.com/winterboard.git/commitdiff_plain/734230a96f618263c185fbc66d8a8073ede26722 Split identifier/folder in $pathForFile$inBundle$. --- diff --git a/Library.mm b/Library.mm index 28f5085..dbc1995 100644 --- a/Library.mm +++ b/Library.mm @@ -329,13 +329,12 @@ static NSString *$getTheme$(NSArray *files, NSArray *themes = Themes_) { } // }}} // $pathForFile$inBundle$() {{{ -static NSString *$pathForFile$inBundle$(NSString *file, NSBundle *bundle, bool ui, bool use) { - NSString *identifier = [bundle bundleIdentifier]; +static NSString *$pathForFile$inBundle$(NSString *file, NSString *identifier, NSString *folder, bool ui, bool use) { NSMutableArray *names = [NSMutableArray arrayWithCapacity:8]; if (identifier != nil) [names addObject:[NSString stringWithFormat:@"Bundles/%@/%@", identifier, file]]; - if (NSString *folder = [[bundle bundlePath] lastPathComponent]) { + if (folder != nil) { [names addObject:[NSString stringWithFormat:@"Folders/%@/%@", folder, file]]; NSString *base([folder stringByDeletingPathExtension]); if ([base hasSuffix:@"~iphone"]) @@ -371,6 +370,10 @@ static NSString *$pathForFile$inBundle$(NSString *file, NSBundle *bundle, bool u return nil; } + +static NSString *$pathForFile$inBundle$(NSString *file, NSBundle *bundle, bool ui, bool use) { + return $pathForFile$inBundle$(file, [bundle bundleIdentifier], [[bundle bundlePath] lastPathComponent], ui, use); +} // }}} static NSString *$pathForIcon$(SBApplication *self, NSString *suffix = @"") {