mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/net/ftp.rb (putbinaryfile): use APPE for resume.
Thanks, Tomoyuki Chikanaga. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e5f3893c44
commit
5cd52d02eb
2 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Thu Nov 19 23:22:40 2009 Shugo Maeda <shugo@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/net/ftp.rb (putbinaryfile): use APPE for resume.
|
||||||
|
Thanks, Tomoyuki Chikanaga.
|
||||||
|
|
||||||
Thu Nov 19 22:34:49 2009 Shugo Maeda <shugo@ruby-lang.org>
|
Thu Nov 19 22:34:49 2009 Shugo Maeda <shugo@ruby-lang.org>
|
||||||
|
|
||||||
* lib/net/imap.rb (flag_list): untaint strings to intern in the safe
|
* lib/net/imap.rb (flag_list): untaint strings to intern in the safe
|
||||||
|
|
|
@ -449,7 +449,7 @@ module Net
|
||||||
end
|
end
|
||||||
synchronize do
|
synchronize do
|
||||||
voidcmd("TYPE I")
|
voidcmd("TYPE I")
|
||||||
conn = transfercmd(cmd, rest_offset)
|
conn = transfercmd(cmd)
|
||||||
loop do
|
loop do
|
||||||
buf = file.read(blocksize)
|
buf = file.read(blocksize)
|
||||||
break if buf == nil
|
break if buf == nil
|
||||||
|
@ -559,7 +559,11 @@ module Net
|
||||||
f = open(localfile)
|
f = open(localfile)
|
||||||
begin
|
begin
|
||||||
f.binmode
|
f.binmode
|
||||||
storbinary("STOR " + remotefile, f, blocksize, rest_offset, &block)
|
if rest_offset
|
||||||
|
storbinary("APPE " + remotefile, f, blocksize, rest_offset, &block)
|
||||||
|
else
|
||||||
|
storbinary("STOR " + remotefile, f, blocksize, rest_offset, &block)
|
||||||
|
end
|
||||||
ensure
|
ensure
|
||||||
f.close
|
f.close
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue