2009-01-26 13:02 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)

* harbour/contrib/hbziparc/hbziparc.prg
    ! Fixed <acFiles> behavior if the parameter is not passed.
This commit is contained in:
Pritpal Bedi
2009-01-26 21:05:39 +00:00
parent fe43de6002
commit 7c18347f57
2 changed files with 16 additions and 4 deletions

View File

@@ -8,6 +8,10 @@
2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2009-01-26 13:02 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* harbour/contrib/hbziparc/hbziparc.prg
! Fixed <acFiles> behavior if the parameter is not passed.
2009-01-26 21:25 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/common/hbprintf.c
* harbour/source/codepage/cpeswinm.c

View File

@@ -935,6 +935,7 @@ FUNCTION hb_UnzipFile( cFileName, bUpdate, lWithPath, cPassword, cPath, acFiles,
LOCAL nPos
LOCAL cZipName
LOCAL cExt
LOCAL lExtract
DEFAULT lWithPath TO .F.
@@ -971,15 +972,22 @@ FUNCTION hb_UnzipFile( cFileName, bUpdate, lWithPath, cPassword, cPath, acFiles,
nPos++
IF hb_UnzipFileInfo( hUnzip, @cZipName ) == 0
/* NOTE: As opposed to original hbziparch we don't do a second match without path. */
IF AScan( acFiles, nPos ) > 0 .OR. ;
AScan( acFiles, {| cMask | hb_FileMatch( cZipName, cMask ) } ) > 0
IF !Empty( acFiles )
IF AScan( acFiles, nPos ) > 0 .OR. ;
AScan( acFiles, {| cMask | hb_FileMatch( cZipName, cMask ) } ) > 0
lExtract := .t.
ELSE
lExtract := .f.
ENDIF
ELSE
lExtract := .t.
ENDIF
IF lExtract
IF hb_isBlock( bUpdate )
Eval( bUpdate, cZipName, nPos )
ENDIF
hb_UnzipExtractCurrentFile( hUnzip, cPath + cZipName, cPassword )
ENDIF
ENDIF