1
0
Fork 0
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:
Jamis Buck 2006-01-28 16:04:07 +00:00
parent 3d98ce91e3
commit 249d8ac439
2 changed files with 3 additions and 1 deletions

View file

@ -1,5 +1,7 @@
*0.11.0* *SVN* *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 branch support to CVS [jeremy@hinegardner.org] (#3596)
* Add bazaar-ng SCM module [Damien Merenne] * Add bazaar-ng SCM module [Damien Merenne]

View file

@ -58,7 +58,7 @@ module SwitchTower
sftp = @actor.sessions[server].sftp sftp = @actor.sessions[server].sftp
sftp.connect unless sftp.state == :open 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) break unless check_status("open #{@filename}", server, status)
logger.info "uploading data to #{server}:#{@filename}" logger.info "uploading data to #{server}:#{@filename}"