mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
Make sure IO::TRUNC is specified for Net::SFTP uploads (closes #3510)
git-svn-id: http://svn.rubyonrails.org/rails/tools/switchtower@3491 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
3d98ce91e3
commit
249d8ac439
2 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
|||
*0.11.0* *SVN*
|
||||
|
||||
* Make sure IO::TRUNC is specified for Net::SFTP uploads (#3510)
|
||||
|
||||
* Add branch support to CVS [jeremy@hinegardner.org] (#3596)
|
||||
|
||||
* Add bazaar-ng SCM module [Damien Merenne]
|
||||
|
|
|
@ -58,7 +58,7 @@ module SwitchTower
|
|||
sftp = @actor.sessions[server].sftp
|
||||
sftp.connect unless sftp.state == :open
|
||||
|
||||
sftp.open(@filename, IO::WRONLY | IO::CREAT, @params[:mode] || 0660) do |status, handle|
|
||||
sftp.open(@filename, IO::WRONLY | IO::CREAT | IO::TRUNC, @params[:mode] || 0660) do |status, handle|
|
||||
break unless check_status("open #{@filename}", server, status)
|
||||
|
||||
logger.info "uploading data to #{server}:#{@filename}"
|
||||
|
|
Loading…
Reference in a new issue