diff options
author | Paul Nasrat <pnasrat@googlemail.com> | 2008-09-19 11:41:45 +0100 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2008-09-30 22:21:49 +1000 |
commit | af8c70650b028a70ed50ac6c2bd7f4f00c17ae03 (patch) | |
tree | 0a64e59476b9f3d285731875ec57fba69b818785 /lib/puppet/file_serving | |
parent | 860bdb120df93c3ad9f323529f22f71ca8548cf8 (diff) | |
download | puppet-af8c70650b028a70ed50ac6c2bd7f4f00c17ae03.tar.gz puppet-af8c70650b028a70ed50ac6c2bd7f4f00c17ae03.tar.xz puppet-af8c70650b028a70ed50ac6c2bd7f4f00c17ae03.zip |
Fix metadata class for cases when checksum_type set
Diffstat (limited to 'lib/puppet/file_serving')
-rw-r--r-- | lib/puppet/file_serving/metadata.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/file_serving/metadata.rb b/lib/puppet/file_serving/metadata.rb index beecaef48..b277955ac 100644 --- a/lib/puppet/file_serving/metadata.rb +++ b/lib/puppet/file_serving/metadata.rb @@ -60,10 +60,10 @@ class Puppet::FileServing::Metadata < Puppet::FileServing::FileBase case stat.ftype when "file": - @checksum = ("{%s}" % @checksum_type) + send("%s_file" % @checksum_type, real_path) + @checksum = ("{%s}" % @checksum_type) + send("%s_file" % @checksum_type, real_path).to_s when "directory": # Always just timestamp the directory. - sumtype = @checksum_type.to_s =~ /time/ ? @checksum_type : "ctime" - @checksum = ("{%s}" % sumtype) + send("%s_file" % sumtype, path).to_s + @checksum_type = "ctime" + @checksum = ("{%s}" % @checksum_type) + send("%s_file" % @checksum_type, path).to_s when "link": @destination = File.readlink(real_path) else |