summaryrefslogtreecommitdiff
path: root/chef/lib/chef/provider/file.rb
diff options
context:
space:
mode:
Diffstat (limited to 'chef/lib/chef/provider/file.rb')
-rw-r--r--chef/lib/chef/provider/file.rb4
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