Add note about default icon assumption potentially being off

This commit is contained in:
Zorg committed 2016-02-14 13:18:32 -05:00
1 parent 96fb18e0df
commit 7ca99547b9
1 file changed
+2
+2
View File
@@ -158,6 +158,8 @@
NSImage *icon = [[NSImage alloc] initWithContentsOfFile:iconPath];
// Use a default icon if none is defined.
if (!icon) {
// this asumption may not be correct (eg. even though we're not the main bundle, it could be still be a regular app)
// but still better than nothing if no icon was included
BOOL isMainBundle = (self.bundle == [NSBundle mainBundle]);
NSString *fileType = isMainBundle ? (__bridge NSString *)kUTTypeApplication : (__bridge NSString *)kUTTypeBundle;