From c64a462d161790dab1853f812baa872ebec5c7c2 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 25 Nov 2014 15:58:20 -0800 Subject: [PATCH] Merge identifier/folder in $pathForFile$inBundle$. --- Library.mm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Library.mm b/Library.mm index 5857687..e30a4dd 100644 --- a/Library.mm +++ b/Library.mm @@ -329,12 +329,13 @@ static NSString *$getTheme$(NSArray *files, NSArray *themes = Themes_) { } // }}} // $pathForFile$inBundle$() {{{ -static NSString *$pathForFile$inBundle$(NSString *file, NSString *identifier, NSString *folder, bool use) { +static NSString *$pathForFile$inBundle$(NSString *file, NSBundle *bundle, bool use) { + NSString *identifier = [bundle bundleIdentifier]; NSMutableArray *names = [NSMutableArray arrayWithCapacity:8]; if (identifier != nil) [names addObject:[NSString stringWithFormat:@"Bundles/%@/%@", identifier, file]]; - if (folder != nil) { + if (NSString *folder = [[bundle bundlePath] lastPathComponent]) { [names addObject:[NSString stringWithFormat:@"Folders/%@/%@", folder, file]]; NSString *base([folder stringByDeletingPathExtension]); if ([base hasSuffix:@"~iphone"]) @@ -370,10 +371,6 @@ static NSString *$pathForFile$inBundle$(NSString *file, NSString *identifier, NS return nil; } - -static NSString *$pathForFile$inBundle$(NSString *file, NSBundle *bundle, bool use) { - return $pathForFile$inBundle$(file, [bundle bundleIdentifier], [[bundle bundlePath] lastPathComponent], use); -} // }}} static NSString *$pathForIcon$(SBApplication *self, NSString *suffix = @"") { -- 2.45.2