diff options
author | Bryan McLellan <btm@loftninjas.org> | 2012-11-27 15:53:15 -0500 |
---|---|---|
committer | Bryan McLellan <btm@loftninjas.org> | 2012-11-27 15:53:15 -0500 |
commit | 49e7257d382c2fcb1f8e16c8939c40f5aa529603 (patch) | |
tree | 04af4495354b9b91a5057ad4a95f7062c5fe3855 | |
parent | 76838caac7075c9258c4561a974c18811da01f78 (diff) | |
download | chef-49e7257d382c2fcb1f8e16c8939c40f5aa529603.tar.gz |
Switch template provider to FileUtils.cp
This reverses the changes made in CHEF-1396. When copying a file over
an existing file, the permissions of the existing file are maintained.
When moving the file the permissions of the source file are preserved.
Since CHEF-1396, we now set permissions after copying (formerly moving)
the file, but only do so if there are permissions specified by the user
to be set.
-rw-r--r-- | chef/lib/chef/provider/template.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chef/lib/chef/provider/template.rb b/chef/lib/chef/provider/template.rb index c937b9d980..4c0989ac26 100644 --- a/chef/lib/chef/provider/template.rb +++ b/chef/lib/chef/provider/template.rb @@ -61,7 +61,7 @@ class Chef description << diff_current(rendered_template.path) converge_by(description) do backup - FileUtils.mv(rendered_template.path, @new_resource.path) + FileUtils.cp(rendered_template.path, @new_resource.path) Chef::Log.info("#{@new_resource} updated content") access_controls.set_all! stat = ::File.stat(@new_resource.path) |