From ee5575d9b34ba547c0677a9b90bda2ebc066acee Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Wed, 26 Aug 2015 21:33:41 +0200 Subject: [PATCH] BRoster: Apply no-registrar mode in a few more cases. Avoids some more attempts at communicating with the registrar if the no-registrar flag has been set. --- src/kits/app/Roster.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/kits/app/Roster.cpp b/src/kits/app/Roster.cpp index 1a8c76900b..deaef0b4a6 100644 --- a/src/kits/app/Roster.cpp +++ b/src/kits/app/Roster.cpp @@ -2068,7 +2068,7 @@ BRoster::_ResolveApp(const char* inType, entry_ref* ref, } // create meta mime - if (error == B_OK) { + if (!fNoRegistrar && error == B_OK) { BPath path; if (path.SetTo(&appRef) == B_OK) create_app_meta_mime(path.Path(), false, true, false); @@ -2077,7 +2077,7 @@ BRoster::_ResolveApp(const char* inType, entry_ref* ref, // set the app hint on the type -- but only if the file has the // respective signature, otherwise unset the app hint BAppFileInfo appFileInfo; - if (error == B_OK) { + if (!fNoRegistrar && error == B_OK) { char signature[B_MIME_TYPE_LENGTH]; if (appFileInfo.SetTo(&appFile) == B_OK && appFileInfo.GetSignature(signature) == B_OK) { @@ -2482,6 +2482,9 @@ BRoster::_GetFileType(const entry_ref* file, BNodeInfo* nodeInfo, if (nodeInfo->GetType(mimeType) == B_OK) return B_OK; + if (fNoRegistrar) + return B_NO_INIT; + // Try to update the file's MIME info and just read the updated type. // If that fails, sniff manually. BPath path;