diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b17203cdeb..cd9399427e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -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 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 diff --git a/harbour/contrib/hbziparc/hbziparc.prg b/harbour/contrib/hbziparc/hbziparc.prg index 4f36f07142..3b79a9b6b9 100644 --- a/harbour/contrib/hbziparc/hbziparc.prg +++ b/harbour/contrib/hbziparc/hbziparc.prg @@ -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