Important correction for TIdFTP.SendEPassive

Giganews Newsgroups
Subject: Important correction for TIdFTP.SendEPassive
Posted by:  Tobias Giesen (tobi…@tgtools.de)
Date: Fri, 21 Jul 2006

About one page down in this function, there is an important line of code
simply missing.

Rather than
  try
    ParseEPSV(Sys.Trim(LastCmdResult.Text[0]), VIP, VPort);
    // "229 Entering Extended Passive Mode (|||59028|)"
    bLeft := IndyPos('(', s);  {do not localize}
    bRight := IndyPos(')', s);  {do not localize}

IT MUST BE
  try
    ParseEPSV(Sys.Trim(LastCmdResult.Text[0]),VIP,VPort);
    // "229 Entering Extended Passive Mode (|||59028|)"
    s:=Sys.Trim(LastCmdResult.Text[0]); // TG: this was missing!!!!
    bLeft := IndyPos('(', s);  {do not localize}
    bRight := IndyPos(')', s);  {do not localize}

Cheers,
Tobias

Replies