@@ -338,39 +338,6 @@ bool ComponentLoader::import( std::string const& path_list )
338
338
// If the path is not complete (not absolute), look it up in the search directories:
339
339
log (Debug) << " No such directory: " << p<< endlog ();
340
340
}
341
- #if 0
342
- // Repeat for path/OROCOS_TARGET: (already done in other import function)
343
- p = path(*it) / OROCOS_TARGET_NAME;
344
- if (is_directory(p))
345
- {
346
- log(Info) << "Importing component libraries from directory " << p.string() << " ..."<<endlog();
347
- for (directory_iterator itr(p); itr != directory_iterator(); ++itr)
348
- {
349
- log(Debug) << "Scanning file " << itr->path().string() << " ...";
350
- if (is_regular_file(itr->status()) && isLoadableLibrary(itr->path()) ) {
351
- found = true;
352
- #if BOOST_VERSION >= 104600
353
- all_good = loadInProcess( itr->path().string(), makeShortFilename(itr->path().filename().string() ), true) && all_good;
354
- #else
355
- all_good = loadInProcess( itr->path().string(), makeShortFilename(itr->path().filename() ), true) && all_good;
356
- #endif
357
- }else {
358
- if (!is_regular_file(itr->status()))
359
- log(Debug) << "not a regular file: ignored."<<endlog();
360
- else
361
- log(Debug) << "not a " + SO_EXT + " library: ignored."<<endlog();
362
- }
363
- }
364
- log(Info) << "Importing plugins and typekits from directory " << p.string() << " ..."<<endlog();
365
- try {
366
- found = PluginLoader::Instance()->loadTypekits( p.string() ) || found;
367
- found = PluginLoader::Instance()->loadPlugins( p.string() ) || found;
368
- } catch (std::exception& e) {
369
- all_good = false;
370
- log(Error) << e.what() <<endlog();
371
- }
372
- }
373
- #endif
374
341
}
375
342
if (!all_good)
376
343
throw std::runtime_error (" Some found plugins could not be loaded !" );
@@ -450,7 +417,7 @@ bool ComponentLoader::importInstalledPackage(std::string const& package, std::st
450
417
} // else: we allow to import a subdirectory of '.'.
451
418
}
452
419
// append '/package' or 'target/package' to each plugin path in order to search all of them:
453
- for (vector<string>::iterator it = vpaths.begin (); it != vpaths.end (); ++it) {
420
+ for (vector<string>::iterator it = vpaths.begin (); !path_found && it != vpaths.end (); ++it) {
454
421
p = *it;
455
422
p = p / package;
456
423
// we only search in existing directories:
0 commit comments