Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Dec : TIdFTP: Can not resume file more 2 GB
| Subject: | TIdFTP: Can not resume file more 2 GB |
| Posted by: | "Alexe Bilchenko" (alexei.bilchen..@impet.com) |
| Date: | Thu, 13 Dec 2007 11:15:01 |
I use latest indy 10 (Download 2 weeks ago)
I receive:
Project Ftp.exe raised exception class ERangeError with message 'Range check
error'.
in unit IdIOHandler :
procedure TIdIOHandler.Write(AStream: TIdStream; ASize: Int64 = 0;
AWriteByteCount: Boolean = FALSE);
var
LBuffer: TIdBytes;
LBufSize: Integer;
begin
if ASize < 0 then begin //"-1" All form current position
LBufSize := AStream.Position; //Error!!!!!!!
Maybe can use simple code:
ASize := AStream.Size - AStream.Position;
What do you think about this? Maybe need add new variable
My code:
i64BytesSent := FTPClient.Size(DestFileName);
Resume := BytesSent > - 1;
Stream.Position := i64BytesSent;
FTPClient.Put(Stream, DestFileName, Resume);