From 157c0ddff032bb78838a1448eb1ff989bf1da705 Mon Sep 17 00:00:00 2001 From: Paul Nasrat Date: Sat, 11 Oct 2008 08:12:22 +0100 Subject: Fix 1642 (always warning) and improve unit tests to cover when to warn and not --- lib/puppet/type/file/checksum.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/puppet/type/file/checksum.rb b/lib/puppet/type/file/checksum.rb index 27edee13d..785ed0fee 100755 --- a/lib/puppet/type/file/checksum.rb +++ b/lib/puppet/type/file/checksum.rb @@ -53,7 +53,7 @@ Puppet::Type.type(:file).newproperty(:checksum) do else if FileTest.directory?(@resource[:path]) return :time - elsif @resource[:source] + elsif @resource[:source] and value.to_s != "md5" self.warning("Files with source set must use md5 as checksum. Forcing to md5 from %s for %s" % [ value, @resource[:path] ]) return :md5 else -- cgit