NetTalk Central

NetTalk FTP => FTP - Ask For Help => Topic started by: Larry Sand on April 24, 2013, 10:11:53 AM

Title: Expected filesize property looking for lower case ' bytes' only.
Post by: Larry Sand on April 24, 2013, 10:11:53 AM
Hi Bruce,

This:

NetFTPClientControl._HandleGetRemoteFileReplies Procedure()
loc:temp1       long
pn              equate('NetFTPClientControl._HandleGetRemoteFileReplies')
  code
  self.Log(pn, '')
  self._ErrorFunction = pn

  case self._ReplyCode
  of '125'
    self._replyProcessed = 1
    if (self.OnlyUseSizesInDirList = 0) and (instring(' bytes)',self.Packet.BinData,1,1) <> 0)
      loc:temp1 = self.ExpectedFileSize
      self.ExpectedFileSize = self.Packet.BinData[instring('(',self.Packet.BinData,1,1)+1 : instring(' bytes)',self.Packet.BinData,1,1) -1]
      self.bytesLeftToReceive += self.ExpectedFileSize - loc:temp1
      self.ProgressUpdateNow = 1
      self.calcProgress()
      self.Log (pn, '(125) Incrementing bytesLeftToReceive to ' & self.bytesLeftToReceive)
    end
  of '150'


fails when the server reports ' Bytes' perhaps it could be made case insensitive?

Thanks,
Larry Sand
Title: Re: Expected filesize property looking for lower case ' bytes' only.
Post by: Bruce on April 24, 2013, 09:41:08 PM
done for 7.09
Title: Re: Expected filesize property looking for lower case ' bytes' only.
Post by: Larry Sand on April 25, 2013, 02:12:23 AM
Thanks Bruce.