| @@ -328,14 +328,23 @@ void PluginListComponent::filesDropped (const StringArray& files, int, int) | |||||
| FileSearchPath PluginListComponent::getLastSearchPath (PropertiesFile& properties, AudioPluginFormat& format) | FileSearchPath PluginListComponent::getLastSearchPath (PropertiesFile& properties, AudioPluginFormat& format) | ||||
| { | { | ||||
| return FileSearchPath (properties.getValue ("lastPluginScanPath_" + format.getName(), | |||||
| format.getDefaultLocationsToSearch().toString())); | |||||
| auto key = "lastPluginScanPath_" + format.getName(); | |||||
| if (properties.containsKey (key) && properties.getValue (key, {}).trim().isEmpty()) | |||||
| properties.removeValue (key); | |||||
| return FileSearchPath (properties.getValue (key, format.getDefaultLocationsToSearch().toString())); | |||||
| } | } | ||||
| void PluginListComponent::setLastSearchPath (PropertiesFile& properties, AudioPluginFormat& format, | void PluginListComponent::setLastSearchPath (PropertiesFile& properties, AudioPluginFormat& format, | ||||
| const FileSearchPath& newPath) | const FileSearchPath& newPath) | ||||
| { | { | ||||
| properties.setValue ("lastPluginScanPath_" + format.getName(), newPath.toString()); | |||||
| auto key = "lastPluginScanPath_" + format.getName(); | |||||
| if (newPath.getNumPaths() == 0) | |||||
| properties.removeValue (key); | |||||
| else | |||||
| properties.setValue (key, newPath.toString()); | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||