From 734230a96f618263c185fbc66d8a8073ede26722 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 25 Nov 2014 15:28:01 -0800 Subject: [PATCH] Split identifier/folder in $pathForFile$inBundle$. --- Library.mm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 = @"") { -- 2.45.2