diff --git a/modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/module_linux.cpp b/modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/module_linux.cpp index 404054c82851..bcf7f97a97fc 100644 --- a/modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/module_linux.cpp +++ b/modules/juce_audio_processors/format_types/VST3_SDK/public.sdk/source/vst/hosting/module_linux.cpp @@ -164,8 +164,10 @@ class LinuxModule : public Module if (!filesystem::is_directory (modulePath)) return {}; - stem.replace_extension (".so"); - modulePath /= stem; + auto newStem = stem; + newStem.replace_extension(".so"); + modulePath /= newStem; + return Optional (std::move (modulePath)); } @@ -323,11 +325,13 @@ Module::SnapshotList Module::getSnapshots (const std::string& modulePath) { filesystem::path p (png); auto filename = p.filename ().generic_string (); - auto uid = Snapshot::decodeUID (filename); + auto uid = Snapshot::decodeUID(filename); + + if (!uid) continue; auto scaleFactor = 1.; - if (auto decodedScaleFactor = Snapshot::decodeScaleFactor (filename)) + if (auto decodedScaleFactor = Snapshot::decodeScaleFactor(filename)) scaleFactor = *decodedScaleFactor; Module::Snapshot::ImageDesc desc; @@ -366,4 +370,4 @@ Optional Module::getModuleInfoPath (const std::string& modulePath) //------------------------------------------------------------------------ } // Hosting -} // VST3 +} // VST3 \ No newline at end of file