Merge pull request #614 from kolpanic/master

Check for empty strings (as well as nil) in SUHost's -name method
This commit is contained in:
Jake Petroules committed 2015-09-04 08:49:20 -07:00
commit 16c3534d40
1 file changed
+3 -3
+3 -3
View File
@@ -103,13 +103,13 @@
// Allow host bundle to provide a custom name
name = [self objectForInfoDictionaryKey:@"SUBundleName"];
if (name) return name;
if (name && name.length > 0) return name;
name = [self.bundle objectForInfoDictionaryKey:@"CFBundleDisplayName"];
if (name) return name;
if (name && name.length > 0) return name;
name = [self objectForInfoDictionaryKey:(__bridge NSString *)kCFBundleNameKey];
if (name) return name;
if (name && name.length > 0) return name;
return [[[NSFileManager defaultManager] displayNameAtPath:[self.bundle bundlePath]] stringByDeletingPathExtension];
}