From 00c922e0b80dc0765ae32a72e971e09589792bd4 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 26 Nov 2014 14:40:15 -0800 Subject: [PATCH] Move [url lastPathComponent] into Fallback wrapper. --- Library.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library.mm b/Library.mm index e994934..626f280 100644 --- a/Library.mm +++ b/Library.mm @@ -370,10 +370,10 @@ static NSString *$getTheme$(NSArray *files, NSArray *themes = Themes_) { } // }}} // $pathForFile$inBundle$() {{{ -static void $pathForFile$inBundle$(NSMutableArray *names, NSString *file, NSString *identifier, NSURL *url) { +static void $pathForFile$inBundle$(NSMutableArray *names, NSString *file, NSString *identifier, NSString *folder) { if (identifier != nil) [names addObject:[NSString stringWithFormat:@"Bundles/%@/%@", identifier, file]]; - if (NSString *folder = [url lastPathComponent]) { + if (folder != nil) { [names addObject:[NSString stringWithFormat:@"Folders/%@/%@", folder, file]]; NSString *base([folder stringByDeletingPathExtension]); if ([base hasSuffix:@"~iphone"]) @@ -409,7 +409,7 @@ static void $pathForFile$inBundle$(NSMutableArray *names, NSString *file, NSStri static NSString *$pathForFile$inBundle$(NSString *file, NSString *identifier, NSURL *url, bool use) { NSMutableArray *names = [NSMutableArray arrayWithCapacity:8]; - $pathForFile$inBundle$(names, file, identifier, url); + $pathForFile$inBundle$(names, file, identifier, [url lastPathComponent]); [names addObject:[NSString stringWithFormat:@"Fallback/%@", file]]; if (NSString *path = $getTheme$($useScale$(names, use))) return path; -- 2.45.2