Bug 397823 - moz-icon URL for nonexistent content type doesn't return generic icon on Mac OS X; fall back to fetching the icon for NSFileTypeUnknown. r=josh
This commit is contained in:
Родитель
2f8b996551
Коммит
3c91fcdd2a
|
@ -274,7 +274,11 @@ nsresult nsIconChannel::MakeInputStream(nsIInputStream** _retval, PRBool nonBloc
|
|||
NSString* fileExtension = [NSString stringWithUTF8String:PromiseFlatCString(fileExt).get()];
|
||||
iconImage = [[NSWorkspace sharedWorkspace] iconForFileType:fileExtension];
|
||||
}
|
||||
|
||||
|
||||
// If we still don't have an icon, get the generic document icon.
|
||||
if (!iconImage)
|
||||
iconImage = [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeUnknown];
|
||||
|
||||
if (!iconImage)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче