I have tried to resolve the 2GB limit of IdFTP,but failed

Giganews Newsgroups
Subject: I have tried to resolve the 2GB limit of IdFTP,but failed
Posted by:  starsail (star_hik…@hotmail.com)
Date: Tue, 26 Apr 2005

//------------------------My modified code:
function TIdFTP.Size(const AFileName: String): Int64; //Integer;
var
  SizeStr: String;
begin
  result := -1;
  if SendCmd('SIZE ' + AFileName) = 213 then begin  {Do not translate}
    SizeStr := Trim(LastCmdResult.Text.Text);
    system.delete(SizeStr, 1, IndyPos(' ', SizeStr)); // delete the response
{Do not translate}
    result := StrToInt64Def(SizeStr,-1); //StrToIntDef(SizeStr, -1);
  end;
end;
//------------------------

Then I recompiled my program,and try to download a file which size is over
2GB,but above function still returned -1,where is it wrong?
I'm a C++ coder,not familiar with pascal.
I'm using Indy 9 for BCB6.

Replies