Commit 7fdeee62 authored by naucoin's avatar naucoin
Browse files

BUG: set the executable for registered file extensions when reading them in from the cache

git-svn-id: http://svn.slicer.org/Slicer4/trunk@12449 3bd1e089-480b-0410-8dfb-8563597acbee
parent 1c464233
......@@ -2178,7 +2178,7 @@ ModuleFactory
}
else
{
information << "New modules discovered, updating module cache."
information << "New modules discovered, updating module cache in directory " << this->CachePath
<< std::endl;
// put code here to write the cache
......@@ -2288,8 +2288,17 @@ ModuleFactory
{
module.SetTarget( "Unknown" );
}
module.SetLocation( commandName );
// does the command have a known extension?
std::string ext = itksys::SystemTools::GetFilenameExtension(commandName);
const char *executable = this->GetExecutableForFileExtension(ext);
if (executable == NULL)
{
module.SetLocation( commandName );
}
else
{
module.SetLocation( executable );
}
if ((*cit).second.Logo != "None")
{
ModuleLogo logo;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment