From ca0e3da36376c82ef8761742bb0076fcf729775a Mon Sep 17 00:00:00 2001 From: Pavel Tsarenko Date: Tue, 15 May 2012 17:41:21 +0000 Subject: [PATCH] 2012-05-15 20:40 UTC+0300 Pavel Tsarenko (tpe2 at mail.ru) * contrib/hbtip/ftpcli.prg ! small fix in the :FileSize() method * contrib/hbtip/client.prg * added additional check in the :ReadToFile() method --- harbour/ChangeLog | 6 ++++++ harbour/contrib/hbtip/client.prg | 3 +++ harbour/contrib/hbtip/ftpcli.prg | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 3061510bee..1026084ef6 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,12 @@ The license applies to all entries newer than 2009-04-28. */ +2012-05-15 20:40 UTC+0300 Pavel Tsarenko (tpe2 at mail.ru) + * contrib/hbtip/ftpcli.prg + ! small fix in the :FileSize() method + * contrib/hbtip/client.prg + * added additional check in the :ReadToFile() method + 2012-05-15 18:08 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/hbqt/qtwebkit/hbqtwebkit.hbm * contrib/hbqt/hbqt_common.hbm diff --git a/harbour/contrib/hbtip/client.prg b/harbour/contrib/hbtip/client.prg index e9988e1625..f967037205 100644 --- a/harbour/contrib/hbtip/client.prg +++ b/harbour/contrib/hbtip/client.prg @@ -501,6 +501,9 @@ METHOD ReadToFile( cFile, nMode, nSize ) CLASS tIPClient ::nStatus := 2 FClose( nFout ) + IF ::InetErrorCode( ::SocketCon ) != 0 + RETURN .F. + ENDIF RETURN .T. diff --git a/harbour/contrib/hbtip/ftpcli.prg b/harbour/contrib/hbtip/ftpcli.prg index c816af132d..bf4f4e617a 100644 --- a/harbour/contrib/hbtip/ftpcli.prg +++ b/harbour/contrib/hbtip/ftpcli.prg @@ -742,7 +742,7 @@ METHOD fileSize( cFileSpec ) CLASS tIPClientFTP LOCAL aFile LOCAL nSize := 0 FOR EACH aFile IN ::ListFiles( cFileSpec ) - nSize += Val( aFile[ F_SIZE ] ) + nSize += aFile[ F_SIZE ] NEXT RETURN nSize