diff options
author | Bryan McLellan <btm@opscode.com> | 2012-10-25 16:36:40 -0700 |
---|---|---|
committer | Bryan McLellan <btm@opscode.com> | 2012-10-25 16:36:40 -0700 |
commit | 2ac4e2d6b5737ccfa00306432d9f41e294ed7e6a (patch) | |
tree | d8dd92b2b80884de2f4a58de064c711adfd2a3f4 /chef | |
parent | b091d56dc49646ca3bdee95f21f2c575df301ba6 (diff) | |
download | chef-2ac4e2d6b5737ccfa00306432d9f41e294ed7e6a.tar.gz |
Don't get checksum for create_if_missing
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.
Diffstat (limited to 'chef')
-rw-r--r-- | chef/lib/chef/provider/file.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chef/lib/chef/provider/file.rb b/chef/lib/chef/provider/file.rb index faf0bf5422..77f5217027 100644 --- a/chef/lib/chef/provider/file.rb +++ b/chef/lib/chef/provider/file.rb @@ -132,7 +132,9 @@ class Chef @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 |