lib/chef/provider/remote_file.rb in chef-0.9.6 vs lib/chef/provider/remote_file.rb in chef-0.9.8.beta.1

- old
+ new

@@ -69,10 +69,10 @@ set_group if @new_resource.group set_mode if @new_resource.mode end def current_resource_matches_target_checksum? - @new_resource.checksum && @current_resource.checksum && @current_resource.checksum =~ /^#{@new_resource.checksum}/ + @new_resource.checksum && @current_resource.checksum && @current_resource.checksum =~ /^#{Regexp.escape(@new_resource.checksum)}/ end def matches_current_checksum?(candidate_file) Chef::Log.debug "#{@new_resource}: Checking for file existence of #{@new_resource.path}" if ::File.exists?(@new_resource.path)