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);