Skip to content

Commit

Permalink
Don't get checksum for create_if_missing
Browse files Browse the repository at this point in the history
We don't need the checksum in create for create_if_missing because
we're going to create because we already know the file doesn't exist.
  • Loading branch information
btm committed Oct 25, 2012
1 parent b091d56 commit 2ac4e2d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chef/lib/chef/provider/file.rb
Expand Up @@ -132,7 +132,9 @@ def load_current_resource
@current_resource.path(@new_resource.path)
if !::File.directory?(@new_resource.path)
if ::File.exist?(@new_resource.path)
@current_resource.checksum(checksum(@new_resource.path))
if @action != :create_if_missing
@current_resource.checksum(checksum(@new_resource.path))
end
end
end
load_current_resource_attrs
Expand Down

0 comments on commit 2ac4e2d

Please sign in to comment.