I don't quite understand why the preferred handler of

the super type is only regarded for "installed" MIME types.
The comment says that uninstalled MIME types are assumed
to be application MIME types, but this is clearly not always
the case. Initializing the secondary signature regardless
fixes the problem that unkown document MIME types open in
a random application, even though their super type has a
preferred handler. If the type is indeed an application
itself, I suppose no harm is done, since the primary
signature takes precedence anyway. Closes ticket #4501.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38810 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2010-09-25 14:43:25 +00:00
parent 3b6fac7943
commit 08ac2a4987
1 changed files with 3 additions and 4 deletions

View File

@ -2683,11 +2683,10 @@ BRoster::_TranslateType(const char* mimeType, BMimeType* appMeta,
secondarySignature[0] = '\0';
if (error == B_OK) {
if (type.IsInstalled()) {
BMimeType superType;
if (type.GetSupertype(&superType) == B_OK)
superType.GetPreferredApp(secondarySignature);
if (type.IsInstalled()) {
if (type.GetPreferredApp(primarySignature) != B_OK) {
// The type is installed, but has no preferred app.
primarySignature[0] = '\0';