Fixing 316105: "Icon defaults to app icon, also for non-app bundles"

Thanks to Hofman.
This commit is contained in:
Andy Matuschak committed 2009-01-12 14:31:52 -08:00
1 parent 6631fce15f
commit 8c092c7453
1 file changed
+1 -1
+1 -1
View File
@@ -83,7 +83,7 @@
iconPath = [bundle pathForResource:[bundle objectForInfoDictionaryKey:@"CFBundleIconFile"] ofType: nil];
NSImage *icon = [[[NSImage alloc] initWithContentsOfFile:iconPath] autorelease];
// Use a default icon if none is defined.
if (!icon) { icon = [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(kGenericApplicationIcon)]; }
if (!icon) { icon = [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(bundle == [NSBundle mainBundle] ? kGenericApplicationIcon : UTGetOSTypeFromString(CFSTR("BNDL")))]; }
return icon;
}