From 10996dd1e571f674a6b4ff04c89f91ee0fc1ecd8 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Mon, 7 Apr 2025 21:29:33 -0400 Subject: [SharedCache] Respect workflow override on shared cache databases Fixes: https://github.com/Vector35/binaryninja-api/issues/6571 --- view/sharedcache/core/SharedCacheView.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'view/sharedcache/core/SharedCacheView.cpp') diff --git a/view/sharedcache/core/SharedCacheView.cpp b/view/sharedcache/core/SharedCacheView.cpp index 14a1670c..2fe32daf 100644 --- a/view/sharedcache/core/SharedCacheView.cpp +++ b/view/sharedcache/core/SharedCacheView.cpp @@ -51,9 +51,6 @@ Ref SharedCacheViewType::GetLoadSettingsForData(BinaryView* data) settings->UpdateProperty(override, "readOnly", false); } - Ref programSettings = Settings::Instance(); - programSettings->Set("analysis.workflows.functionWorkflow", "core.function.sharedCache", viewRef); - settings->RegisterSetting("loader.dsc.processCFStrings", R"({ "title" : "Process CFString Metadata", @@ -221,7 +218,9 @@ bool SharedCacheView::Init() Ref settings = GetLoadSettings(GetTypeName()); - if (!settings) + // If we are a new file (not a database) lets go ahead and set the function workflow. + // We do not set the workflow on database as the user might have changed it in load options prior. + if (!settings && !GetFile()->IsBackedByDatabase()) { Ref programSettings = Settings::Instance(); programSettings->Set("analysis.workflows.functionWorkflow", "core.function.sharedCache", this); -- cgit v1.3.1