diff options
Diffstat (limited to 'lib/puppet/indirector/module_files.rb')
-rw-r--r-- | lib/puppet/indirector/module_files.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/puppet/indirector/module_files.rb b/lib/puppet/indirector/module_files.rb index 12794e4c7..c79fae57b 100644 --- a/lib/puppet/indirector/module_files.rb +++ b/lib/puppet/indirector/module_files.rb @@ -30,7 +30,9 @@ class Puppet::Indirector::ModuleFiles < Puppet::Indirector::Terminus def find(key, options = {}) return nil unless path = find_path(key, options) - return model.new(path, :links => options[:links]) + result = model.new(key, :path => path) + result.links = options[:links] if options[:links] + return result end # Try to find our module. @@ -41,7 +43,7 @@ class Puppet::Indirector::ModuleFiles < Puppet::Indirector::Terminus # Search for a list of files. def search(key, options = {}) return nil unless path = find_path(key, options) - path2instances(path, options) + path2instances(key, path, options) end private |