2011-10-23 15:53 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* contrib/hbziparc/ziparc.prg
    ! HB_UNZIPFILE(): fixed counting bytes read. Please test.
This commit is contained in:
Viktor Szakats
2011-10-23 13:55:01 +00:00
parent f61adeaef4
commit 0a4f8d9d64
2 changed files with 9 additions and 1 deletions

View File

@@ -16,6 +16,10 @@
The license applies to all entries newer than 2009-04-28.
*/
2011-10-23 15:53 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbziparc/ziparc.prg
! HB_UNZIPFILE(): fixed counting bytes read. Please test.
2011-10-22 16:22 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/fm.c
! do not enable by default DLMALLOC in WinCE builds.

View File

@@ -451,7 +451,6 @@ FUNCTION hb_UnzipFile( cFileName, bUpdate, lWithPath, cPassword, cPath, acFiles,
cPath := hb_DirSepAdd( cPath )
nRead := 0
nPos := 0
nErr := hb_UnzipFileFirst( hUnzip )
DO WHILE nErr == 0
@@ -471,6 +470,8 @@ FUNCTION hb_UnzipFile( cFileName, bUpdate, lWithPath, cPassword, cPath, acFiles,
IF hb_UnzipFileOpen( hUnzip, cPassword ) != UNZ_OK
EXIT
ENDIF
nRead := 0
DO WHILE ( nLen := hb_unZipFileRead( hUnzip, @cBuffer, Len( cBuffer ) ) ) > 0
IF hb_isBlock( bProgress )
nRead += nLen
@@ -478,9 +479,12 @@ FUNCTION hb_UnzipFile( cFileName, bUpdate, lWithPath, cPassword, cPath, acFiles,
ENDIF
FWrite( hHandle, cBuffer, nLen )
ENDDO
hb_UnzipFileClose( hUnzip )
FClose( hHandle )
hb_FSetDateTime( cPath + cZipName, dDate, cTime )
IF hb_isBlock( bUpdate )
Eval( bUpdate, cZipName, nPos )
ENDIF