Browse files

Now checks CFBundleExecutable when returning OFHostAppName(). Thanks …

…to Jan and Tomaz for the improvement.
  • Loading branch information...
1 parent 6e0dc4f commit aca30cd0226fb0db85fb8c29721cc19a5fcf7ee1 @tylerhall committed Mar 23, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 OFUtilities.m
View
5 OFUtilities.m
@@ -30,8 +30,9 @@ id OFInfoValueForKey(NSString *key)
NSString *OFHostAppName()
{
- if (OFInfoValueForKey(@"CFBundleName")) { return OFInfoValueForKey(@"CFBundleName"); }
- return [[[NSFileManager defaultManager] displayNameAtPath:[[NSBundle mainBundle] bundlePath]] stringByDeletingPathExtension];
+ if (OFInfoValueForKey(@"CFBundleExecutable")) { return OFInfoValueForKey(@"CFBundleExecutable"); }
+ if (OFInfoValueForKey(@"CFBundleName")) { return OFInfoValueForKey(@"CFBundleName"); }
+ return [[[NSFileManager defaultManager] displayNameAtPath:[[NSBundle mainBundle] bundlePath]] stringByDeletingPathExtension];
}
NSString *OFHostAppDisplayName()

0 comments on commit aca30cd

Please sign in to comment.