Fix to ftpclient.prg date

62 views
Skip to first unread message

Itamar Lins

unread,
Sep 9, 2022, 9:42:42 AM9/9/22
to Harbour Developers
Hi!
Borrowed from xHarbour.

xHarbour
```
METHOD listFiles( cFileSpec ) CLASS TIPClientFTP
...
// Day
DO WHILE cEntry[++nStart] == " " ; ENDDO
nEnd := At( Chr( 32 ), cEntry, nStart )
cDay := SubStr( cEntry, nStart, nEnd - nStart )
cDay := PadL( Val( cDay ), 2, "0" )
nStart := nEnd
```
Harbour
// Day
DO WHILE SubStr( cEntry, ++nStart, 1 ) == " "
ENDDO
nEnd := hb_At( " ", cEntry, nStart )
cDay := SubStr( cEntry, nStart, nEnd - nStart )
nStart := nEnd

Note: -> cDay:=PadL( Val(cDay),2,"0") absent in Harbour source.

Best regards,
Itamar M. Lins Jr.
Reply all
Reply to author
Forward
0 new messages