lib/chef/provider/remote_file.rb in chef-0.9.0.a4 vs lib/chef/provider/remote_file.rb in chef-0.9.0.a6
- old
+ new
@@ -27,9 +27,14 @@
class Provider
class RemoteFile < Chef::Provider::File
include Chef::Mixin::FindPreferredFile
+ def load_current_resource
+ super
+ @current_resource.checksum(checksum(@current_resource.path)) if ::File.exist?(@current_resource.path)
+ end
+
def action_create
Chef::Log.debug("Checking #{@new_resource} for changes")
if current_resource_matches_target_checksum?
Chef::Log.debug("File #{@new_resource} checksum matches target checksum (#{@new_resource.checksum}), not updating")