From 69e5d3a0fcb3cd161574f9d2d5168a6c068e2e0e Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 27 Oct 2011 17:13:03 +0000 Subject: [PATCH] 2011-10-27 19:12 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbziparc/ziparc.prg ! HB_ZIPFILE(): one fix to filename matching ! HB_UNZIPFILE(): two fixes to previous patch ; Patch by Grigory Filatov. --- harbour/ChangeLog | 6 ++++++ harbour/contrib/hbziparc/ziparc.prg | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c8ac73c048..d604a4a811 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,12 @@ The license applies to all entries newer than 2009-04-28. */ +2011-10-27 19:12 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbziparc/ziparc.prg + ! HB_ZIPFILE(): one fix to filename matching + ! HB_UNZIPFILE(): two fixes to previous patch + ; Patch by Grigory Filatov. + 2011-10-27 14:28 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbexpat/core.c ! fixed two errors in conditional code for <=1.95.8 expat versions diff --git a/harbour/contrib/hbziparc/ziparc.prg b/harbour/contrib/hbziparc/ziparc.prg index 327f92f038..a9c187e663 100644 --- a/harbour/contrib/hbziparc/ziparc.prg +++ b/harbour/contrib/hbziparc/ziparc.prg @@ -347,7 +347,8 @@ FUNCTION hb_ZipFile( cFileName,; ENDIF NEXT ELSE - IF AScan( aExclFile, {| cExclFile | hb_FileMatch( cFN, cExclFile ) } ) == 0 + hb_FNameSplit( cFN, NIL, @cName, @cExt ) + IF AScan( aExclFile, {| cExclFile | hb_FileMatch( hb_FNameMerge( NIL, cName, cExt ), cExclFile ) } ) == 0 AAdd( aProcFile, cFN ) ENDIF ENDIF @@ -422,7 +423,7 @@ FUNCTION hb_UnzipFile( cFileName, bUpdate, lWithPath, cPassword, cPath, acFiles, DEFAULT lWithPath TO .F. IF lWithPath - IF hb_DirCreate( cPath ) != 0 + IF hb_DirCreate( cPath ) != 0 .AND. !hb_DirExists( cPath ) lRetVal := .F. ENDIF ENDIF @@ -468,6 +469,7 @@ FUNCTION hb_UnzipFile( cFileName, bUpdate, lWithPath, cPassword, cPath, acFiles, ( hHandle := FCreate( cPath + cZipName ) ) != F_ERROR IF hb_UnzipFileOpen( hUnzip, cPassword ) != UNZ_OK + lRetVal := .F. EXIT ENDIF