summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-03-10 00:27:46 -0500
committerLuke Kanies <luke@madstop.com>2009-03-10 00:27:46 -0500
commit858480b04d84e56aa483c80642dd0512af4fd025 (patch)
treee5376c7911bc94e538aabbc8e242b7879754d0d2 /lib
parent27aa21012d249bd39070115e6f640c0196bbdd81 (diff)
downloadpuppet-858480b04d84e56aa483c80642dd0512af4fd025.tar.gz
puppet-858480b04d84e56aa483c80642dd0512af4fd025.tar.xz
puppet-858480b04d84e56aa483c80642dd0512af4fd025.zip
Correctly handling non-string checksums
Content is now returning the checksum rather than the actual content, and the method of creating the full checksum wasn't correctly handling timestamps, which aren't strings and can't be the right side of a String + call. I've opened #2064 as a better long-term fix. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib')
-rwxr-xr-xlib/puppet/type/file/content.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/type/file/content.rb b/lib/puppet/type/file/content.rb
index a5fe9920a..f48e601fb 100755
--- a/lib/puppet/type/file/content.rb
+++ b/lib/puppet/type/file/content.rb
@@ -105,7 +105,7 @@ module Puppet
return nil if stat.ftype == "directory"
begin
- return "{#{checksum_type}}" + send(checksum_type.to_s + "_file", resource[:path])
+ return "{#{checksum_type}}" + send(checksum_type.to_s + "_file", resource[:path]).to_s
rescue => detail
raise Puppet::Error, "Could not read %s: %s" % [@resource.title, detail]
end