if not ftp.Login then begin SaveLogString(sLogFileName, 'Ошибка подключения к FTP серверу: '+ftp.ResultString); FreeAndNil(ftp); Close; Exit; end; //----------17595-------->> if ValidInfo.FTPResumeValue > 0 then begin b := True; if not ftp.StoreFile(sTmpOut+'.tmp' , true) then begin for I := 0 to ValidInfo.FTPResumeValue-1 do begin Application.ProcessMessages; SaveLogString(sLogFileName, 'Обрыв связи, попытка докачки ' + inttostr(i+1) + ' из ' + inttostr(ValidInfo.FTPResumeValue)+ ' через '+ IntToStr(ValidInfo.FTPResumeHour) + ' час. ' + IntToStr(ValidInfo.FTPResumeMinute)+ ' мин.' ); Sleep( (3600000 * ValidInfo.FTPResumeHour)+(ValidInfo.FTPResumeMinute * 60000) ); if ftp.Login then SaveLogString(sLogFileName, 'Докачка архива на FTP сервер, ждите..'); if ftp.StoreFile(sTmpOut+'.tmp' , true) then b := True else b := false; if b then Break; end; end; end else begin if not ftp.StoreFile(sTmpOut+'.tmp' , false) then b := false else b := True; end; |