# HG changeset patch # User Sebastien Jodogne # Date 1402769531 -7200 # Node ID d2a393061eb6c9fd4fac94d0454293c5c150da24 # Parent d44b845c1c895819c3fbda2459534573a27a41e1 typos diff -r d44b845c1c89 -r d2a393061eb6 Plugins/Engine/PluginsManager.cpp --- a/Plugins/Engine/PluginsManager.cpp Sat Jun 14 19:47:51 2014 +0200 +++ b/Plugins/Engine/PluginsManager.cpp Sat Jun 14 20:12:11 2014 +0200 @@ -193,28 +193,30 @@ } - void PluginsManager::ScanFolderForPlugins(const std::string& path, + void PluginsManager::ScanFolderForPlugins(const std::string& folder, bool isRecursive) { using namespace boost::filesystem; - if (!exists(path)) + if (!exists(folder)) { return; } - LOG(INFO) << "Scanning folder " << path << " for plugins"; + LOG(INFO) << "Scanning folder " << folder << " for plugins"; directory_iterator end_it; // default construction yields past-the-end - for (directory_iterator it(path); + for (directory_iterator it(folder); it != end_it; ++it) { + std::string path = it->path().string(); + if (is_directory(it->status())) { if (isRecursive) { - ScanFolderForPlugins(it->path().string(), true); + ScanFolderForPlugins(path, true); } } else @@ -225,10 +227,10 @@ try { - SharedLibrary plugin(it->path().string()); + SharedLibrary plugin(path); if (IsOrthancPlugin(plugin)) { - RegisterPlugin(it->path().string()); + RegisterPlugin(path); } } catch (OrthancException&)