NetTalk Central

Author Topic: Expected filesize property looking for lower case ' bytes' only.  (Read 6800 times)

Larry Sand

  • Full Member
  • ***
  • Posts: 101
    • View Profile
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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Expected filesize property looking for lower case ' bytes' only.
« Reply #1 on: April 24, 2013, 09:41:08 PM »
done for 7.09

Larry Sand

  • Full Member
  • ***
  • Posts: 101
    • View Profile
Re: Expected filesize property looking for lower case ' bytes' only.
« Reply #2 on: April 25, 2013, 02:12:23 AM »
Thanks Bruce.