Mercurial > hg > orthanc
changeset 889:d2a393061eb6 plugins
typos
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 14 Jun 2014 20:12:11 +0200 |
parents | d44b845c1c89 |
children | d0a08d8881b7 |
files | Plugins/Engine/PluginsManager.cpp |
diffstat | 1 files changed, 9 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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&)