summaryrefslogtreecommitdiffstats
path: root/source/PluginManager.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-09-18 18:43:03 +0200
committermadmaxoft <github@xoft.cz>2013-09-18 20:40:09 +0200
commitedd7363eddc9f6ef6a7f798a092500b328d5a7f3 (patch)
tree83055f891681c9e774ec5bd8a3bee7b514f2839b /source/PluginManager.cpp
parentcPluginManager:BindConsoleCommand can be called with the dot operator, too. (diff)
downloadcuberite-edd7363eddc9f6ef6a7f798a092500b328d5a7f3.tar
cuberite-edd7363eddc9f6ef6a7f798a092500b328d5a7f3.tar.gz
cuberite-edd7363eddc9f6ef6a7f798a092500b328d5a7f3.tar.bz2
cuberite-edd7363eddc9f6ef6a7f798a092500b328d5a7f3.tar.lz
cuberite-edd7363eddc9f6ef6a7f798a092500b328d5a7f3.tar.xz
cuberite-edd7363eddc9f6ef6a7f798a092500b328d5a7f3.tar.zst
cuberite-edd7363eddc9f6ef6a7f798a092500b328d5a7f3.zip
Diffstat (limited to '')
-rw-r--r--source/PluginManager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/PluginManager.cpp b/source/PluginManager.cpp
index 93ee71926..e7cac457c 100644
--- a/source/PluginManager.cpp
+++ b/source/PluginManager.cpp
@@ -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;
}