From 5632ddb849821bf8c4fac9f4aa8c4779575eef97 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 30 Sep 2009 15:15:08 +0200 Subject: fix all instances of dent->d_type == DT_REG checks Signed-off-by: Denys Vlasenko --- src/Daemon/PluginManager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Daemon') diff --git a/src/Daemon/PluginManager.cpp b/src/Daemon/PluginManager.cpp index 73d4dff..4c1dae5 100644 --- a/src/Daemon/PluginManager.cpp +++ b/src/Daemon/PluginManager.cpp @@ -133,8 +133,7 @@ void CPluginManager::LoadPlugins() struct dirent *dent; while ((dent = readdir(dir)) != NULL) { - // FIXME: need to handle DT_UNKNOWN too - if (dent->d_type == DT_REG) + if (is_regular_file(dent, PLUGINS_LIB_DIR)) { std::string name = dent->d_name; std::string extension = name.substr(name.length() - sizeof(PLUGINS_LIB_EXTENSION) + 1); -- cgit