diff options
author | Jesse Campbell <hikeit@gmail.com> | 2013-03-01 22:12:52 -0500 |
---|---|---|
committer | Jesse Campbell <hikeit@gmail.com> | 2013-03-01 22:12:52 -0500 |
commit | ddf3acfee7b296df3e9b9692676e393e96f2f90a (patch) | |
tree | 485b240c59209b788c272fe53db25a289df2eb36 /lib/chef/provider/remote_file/local_file.rb | |
parent | dade9779168a75c84be1e964517412fc89798405 (diff) | |
download | chef-ddf3acfee7b296df3e9b9692676e393e96f2f90a.tar.gz |
set binmode for tempfiles on windows
Diffstat (limited to 'lib/chef/provider/remote_file/local_file.rb')
-rw-r--r-- | lib/chef/provider/remote_file/local_file.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/chef/provider/remote_file/local_file.rb b/lib/chef/provider/remote_file/local_file.rb index 9a07621d14..3b64318f6e 100644 --- a/lib/chef/provider/remote_file/local_file.rb +++ b/lib/chef/provider/remote_file/local_file.rb @@ -32,6 +32,9 @@ class Chef tempfile = nil else tempfile = Tempfile.new(::File.basename(uri.path)) + if Chef::Platform.windows? + tempfile.binmode #required for binary files on Windows platforms + end Chef::Log.debug("#{@new_resource} staging #{uri.path} to #{tempfile.path}") FileUtils.cp(uri.path, tempfile.path) tempfile |