From 08ac2a498771fd46a05f1f557823b9e2fbdb1a3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sat, 25 Sep 2010 14:43:25 +0000 Subject: [PATCH] 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 --- src/kits/app/Roster.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/kits/app/Roster.cpp b/src/kits/app/Roster.cpp index eb7c4ddb19..19ee6eb90a 100644 --- a/src/kits/app/Roster.cpp +++ b/src/kits/app/Roster.cpp @@ -2683,11 +2683,10 @@ BRoster::_TranslateType(const char* mimeType, BMimeType* appMeta, secondarySignature[0] = '\0'; if (error == B_OK) { + BMimeType superType; + if (type.GetSupertype(&superType) == B_OK) + superType.GetPreferredApp(secondarySignature); if (type.IsInstalled()) { - BMimeType superType; - if (type.GetSupertype(&superType) == B_OK) - superType.GetPreferredApp(secondarySignature); - if (type.GetPreferredApp(primarySignature) != B_OK) { // The type is installed, but has no preferred app. primarySignature[0] = '\0';