summaryrefslogtreecommitdiffstats
path: root/lib/puppet/file_serving/metadata.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/file_serving/metadata.rb')
-rw-r--r--lib/puppet/file_serving/metadata.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/file_serving/metadata.rb b/lib/puppet/file_serving/metadata.rb
index 1cc3fa355..1fc2b40ab 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::Base
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