summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBlake Barnett <bdb@bdb-debvm1.stanford.edu>2008-03-06 12:53:57 -0800
committerBlake Barnett <bdb@bdb-debvm1.stanford.edu>2008-03-06 12:53:57 -0800
commiteecc22c52dceeccca148e543336a6cd7d64498e6 (patch)
treefa07094e9252ea12f43b7440765805f1e41dc3f3
parentf1216f82d564d089fb20fd29545e918b3100e02a (diff)
downloadpuppet-eecc22c52dceeccca148e543336a6cd7d64498e6.tar.gz
puppet-eecc22c52dceeccca148e543336a6cd7d64498e6.tar.xz
puppet-eecc22c52dceeccca148e543336a6cd7d64498e6.zip
Cache the same type we check for, hopefully fixes #1116
-rwxr-xr-xlib/puppet/type/file/checksum.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/puppet/type/file/checksum.rb b/lib/puppet/type/file/checksum.rb
index debb5a7db..3be147cb7 100755
--- a/lib/puppet/type/file/checksum.rb
+++ b/lib/puppet/type/file/checksum.rb
@@ -66,6 +66,9 @@ Puppet::Type.type(:file).newproperty(:checksum) do
raise ArgumentError, "A type must be specified to cache a checksum"
end
type = symbolize(type)
+ type = :mtime if type == :timestamp
+ type = :ctime if type == :time
+
unless state = @resource.cached(:checksums)
self.debug "Initializing checksum hash"
state = {}