From 08501a3705472e97805038bd4f229df5db807819 Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 18 Jun 2019 16:51:39 +0100 Subject: [PATCH] Fixed an issue when adding plug-ins with empty paths on macOS in KnownPluginList::createTree() with sortByFileSystemLocation --- .../scanning/juce_KnownPluginList.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp b/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp index d97641ca81..c5080989d1 100644 --- a/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp +++ b/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp @@ -463,17 +463,17 @@ struct PluginTreeUtils static void addPlugin (KnownPluginList::PluginTree& tree, PluginDescription pd, String path) { + #if JUCE_MAC + if (path.containsChar (':')) + path = path.fromFirstOccurrenceOf (":", false, false); // avoid the special AU formatting nonsense on Mac.. + #endif + if (path.isEmpty()) { tree.plugins.add (pd); } else { - #if JUCE_MAC - if (path.containsChar (':')) - path = path.fromFirstOccurrenceOf (":", false, false); // avoid the special AU formatting nonsense on Mac.. - #endif - auto firstSubFolder = path.upToFirstOccurrenceOf ("/", false, false); auto remainingPath = path.fromFirstOccurrenceOf ("/", false, false);