diff --git a/red/nodes/registry.js b/red/nodes/registry.js index a6b3b4ba9..7dc7d7f0b 100644 --- a/red/nodes/registry.js +++ b/red/nodes/registry.js @@ -475,18 +475,13 @@ function loadNodesFromModule(moduleDir,pkg) { * } */ function loadNodeConfig(file,module,name) { - var id = crypto.createHash('sha1').update(file).digest("hex"); - if (module && name) { - var newid = crypto.createHash('sha1').update(module+":"+name).digest("hex"); - var existingInfo = registry.getNodeInfo(id); - if (existingInfo) { - // For a brief period, id for modules were calculated incorrectly. - // To prevent false-duplicates, this removes the old id entry - registry.removeNode(id); - registry.saveNodeList(); - } - id = newid; - + var id = crypto.createHash('sha1').update(module+":"+name).digest("hex"); + var existingInfo = registry.getNodeInfo(id); + if (existingInfo) { + // For a brief period, id for modules were calculated incorrectly. + // To prevent false-duplicates, this removes the old id entry + registry.removeNode(id); + registry.saveNodeList(); } var info = registry.getNodeInfo(id); @@ -507,12 +502,8 @@ function loadNodeConfig(file,module,name) { loaded:false }; - if (module) { - node.name = module+":"+name; - node.module = module; - } else { - node.name = path.basename(file); - } + node.name = module+":"+name; + node.module = module; try { var content = fs.readFileSync(node.template,'utf8');