Skip to content

Commit 859bd88

Browse files
committed
Change plugin shared files copy options to update_existing and load plugin on message thread
1 parent 4861aba commit 859bd88

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

Source/UI/PluginInstaller.cpp

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,7 +1647,7 @@ int PluginInfoComponent::downloadPlugin (const String& plugin, const String& ver
16471647
// Copy only if shared files exist
16481648
if (fs::exists (tempSharedPath))
16491649
{
1650-
const auto copyOptions = fs::copy_options::overwrite_existing
1650+
const auto copyOptions = fs::copy_options::update_existing
16511651
| fs::copy_options::recursive
16521652
| fs::copy_options::copy_symlinks;
16531653
try
@@ -1673,15 +1673,21 @@ int PluginInfoComponent::downloadPlugin (const String& plugin, const String& ver
16731673
return 5;
16741674
}
16751675

1676-
int loadPlugin = AccessClass::getPluginManager()->loadPlugin (pluginDllPath);
1676+
LOGD ("Loading plugin: ", pInfo.displayName, "from ", pluginDllPath);
16771677

1678-
AccessClass::getProcessorList()->fillItemList();
1679-
AccessClass::getProcessorList()->repaint();
1678+
int retCode = -1;
16801679

1681-
if (pInfo.type == "RecordEngine")
1682-
AccessClass::getControlPanel()->updateRecordEngineList();
1680+
MessageManager::callSync ([&]()
1681+
{
1682+
retCode = AccessClass::getPluginManager()->loadPlugin (pluginDllPath);
16831683

1684-
if (loadPlugin == -1)
1684+
AccessClass::getProcessorList()->fillItemList();
1685+
AccessClass::getProcessorList()->repaint();
1686+
1687+
if (pInfo.type == "RecordEngine")
1688+
AccessClass::getControlPanel()->updateRecordEngineList(); });
1689+
1690+
if (retCode == -1)
16851691
return 6;
16861692
}
16871693

0 commit comments

Comments
 (0)