Mercurial > hg > orthanc
comparison Plugins/Engine/PluginsManager.cpp @ 1272:7442097b41c9
Scan of folders for plugins
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 12 Jan 2015 17:42:29 +0100 |
parents | f1c01451a8ee |
children | 6e7e5ed91c2d |
comparison
equal
deleted
inserted
replaced
1271:83d8b3eacf49 | 1272:7442097b41c9 |
---|---|
224 } | 224 } |
225 | 225 |
226 | 226 |
227 void PluginsManager::RegisterPlugin(const std::string& path) | 227 void PluginsManager::RegisterPlugin(const std::string& path) |
228 { | 228 { |
229 if (!boost::filesystem::exists(path)) | |
230 { | |
231 LOG(ERROR) << "Inexistent path to plugins: " << path; | |
232 return; | |
233 } | |
234 | |
235 if (boost::filesystem::is_directory(path)) | |
236 { | |
237 ScanFolderForPlugins(path, false); | |
238 return; | |
239 } | |
240 | |
229 std::auto_ptr<Plugin> plugin(new Plugin(path)); | 241 std::auto_ptr<Plugin> plugin(new Plugin(path)); |
230 | 242 |
231 if (!IsOrthancPlugin(plugin->GetLibrary())) | 243 if (!IsOrthancPlugin(plugin->GetLibrary())) |
232 { | 244 { |
233 LOG(ERROR) << "Plugin " << plugin->GetLibrary().GetPath() | 245 LOG(ERROR) << "Plugin " << plugin->GetLibrary().GetPath() |