Repository navigation
Conversation
| { | ||
| #if defined(_WIN32) | ||
| myenv += std::string(oldenv) + ";"; | ||
| path += ";"; |
There was a problem hiding this comment.
This system dependent issue that was inherited from the env, raises the questions if the interface source be accepting a something higher level than a string with a system dependent separator. A list of string, or an even hight level list of "path" objects might be better.
There was a problem hiding this comment.
Agreed, a list of paths avoids baking the platform-specific separator into caller code. Done in #7035.
ReHash() no longer re-reads ITK_AUTOLOAD_PATH from the environment after 3d301f7, so putenv() + ReHash() silently loaded no plugin. Switch to ObjectFactoryBase::SetAutoloadPath(), matching itkObjectFactoryTest2.
7f1eabb to
7782740
Compare
|
Rebased on main (plain rebase, patch unchanged) to pick up #7028, which fixes the |
27d36ab
into
InsightSoftwareConsortium:main
[Low impact] The PR appears safe to merge.
|
Fix
ExampleIOPluginTest2: switchExamples/IO/IOPlugin.cxxfromputenv()+ReHash()toObjectFactoryBase::SetAutoloadPath(), matching the API introduced in 3d301f7.Root cause
Since 3d301f7,
ReHash()reuses the autoload path cached inObjectFactoryBase's globals instead of re-readingITK_AUTOLOAD_PATHfrom the environment.IOPlugin.cxxstill set the env var at runtime viaputenv(), so the plugin directory passed on the command line was silently ignored, andExampleIOPluginTest2failed with "Could not create IO object for reading file FileFreeIO::...".AI assistance
IOPlugin.cxxto useSetAutoloadPath(), mirroringitkObjectFactoryTest2.cxxIOPluginand ranExampleIOPluginTest/ExampleIOPluginTest2in an existing shared build; both pass