summaryrefslogtreecommitdiffstats
path: root/source/PluginManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/PluginManager.cpp')
-rw-r--r--source/PluginManager.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/source/PluginManager.cpp b/source/PluginManager.cpp
index 93ee71926..a557bdc03 100644
--- a/source/PluginManager.cpp
+++ b/source/PluginManager.cpp
@@ -75,16 +75,16 @@ void cPluginManager::FindPlugins(void)
AStringList Files = GetDirectoryContents(PluginsPath.c_str());
for (AStringList::const_iterator itr = Files.begin(); itr != Files.end(); ++itr)
{
- if (itr->rfind(".") != AString::npos)
+ if ((*itr == ".") || (*itr == "..") || (!cFile::IsFolder(PluginsPath + *itr)))
{
- // Ignore files, we only want directories
+ // We only want folders, and don't want "." or ".."
continue;
}
// Add plugin name/directory to the list
- if (m_Plugins.find( *itr ) == m_Plugins.end())
+ if (m_Plugins.find(*itr) == m_Plugins.end())
{
- m_Plugins[ *itr ] = NULL;
+ m_Plugins[*itr] = NULL;
}
}
}
@@ -95,7 +95,7 @@ void cPluginManager::FindPlugins(void)
void cPluginManager::ReloadPluginsNow(void)
{
- LOG("Loading plugins");
+ LOG("-- Loading Plugins --");
m_bReloadPlugins = false;
UnloadPluginsNow();
@@ -135,11 +135,15 @@ void cPluginManager::ReloadPluginsNow(void)
if (GetNumPlugins() == 0)
{
- LOG("No plugins loaded");
+ LOG("-- No Plugins Loaded --");
+ }
+ else if ((GetNumPlugins() > 1) || (GetNumPlugins() == 0))
+ {
+ LOG("-- Loaded %i Plugins --", GetNumPlugins());
}
else
{
- LOG("Loaded %i plugin(s)", GetNumPlugins());
+ LOG("-- Loaded 1 Plugin --");
}
}