1
0

Proper folder / file distinction in plugin loading.

This commit is contained in:
madmaxoft
2013-09-18 18:43:03 +02:00
parent 403e0d5be4
commit edd7363edd
3 changed files with 20 additions and 3 deletions

View File

@@ -75,14 +75,14 @@ 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 (!cFile::IsFolder(*itr))
{
// Ignore files, we only want directories
// We only want folders
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;
}