diff options
-rwxr-xr-x | lib/puppet/type/file/source.rb | 1 | ||||
-rwxr-xr-x | spec/unit/type/file/source_spec.rb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/puppet/type/file/source.rb b/lib/puppet/type/file/source.rb index 6dda7957c..6ebec51fe 100755 --- a/lib/puppet/type/file/source.rb +++ b/lib/puppet/type/file/source.rb @@ -114,6 +114,7 @@ module Puppet param_name = (metadata_method == :checksum) ? :content : metadata_method next if metadata_method == :owner and !Puppet.features.root? next if metadata_method == :checksum and metadata.ftype == "directory" + next if metadata_method == :checksum and metadata.ftype == "link" and metadata.links == :manage if resource[param_name].nil? or resource[param_name] == :absent resource[param_name] = metadata.send(metadata_method) diff --git a/spec/unit/type/file/source_spec.rb b/spec/unit/type/file/source_spec.rb index 00cc2f235..6e04fa2a5 100755 --- a/spec/unit/type/file/source_spec.rb +++ b/spec/unit/type/file/source_spec.rb @@ -187,6 +187,7 @@ describe Puppet::Type.type(:file).attrclass(:source) do describe "and the source is a link" do it "should set the target to the link destination" do @metadata.stubs(:ftype).returns "link" + @metadata.stubs(:links).returns "manage" @resource.stubs(:[]) @resource.stubs(:[]=) |