If I try to unZip a crypted zipped archive, a -102 ( UNZ_PARAMERROR ) is
returned.
I use hbmzip lib ( and obviously minizip lib, as I use last SVN version ).

I believe to pass the right parameters. What's wrong?
Below a self contained example.
Just strip out the password parameter and all works fine.
TIA.
Maurizio

PROCEDURE Main()

   LOCAL hZip
   LOCAL cFName := "\svn\harbour\ChangeLog"
   LOCAL hUnZip
   LOCAL nErr

      hZip := HB_ZIPOPEN( cFName + ".zip" )
      IF ! Empty( hZip )
         HB_ZipStoreFile( hZip, cFName, , "AnyPassword" )
         HB_ZIPCLOSE( hZip )
      ENDIF

      IF ! Empty( hUnzip := HB_UNZIPOPEN( cFName + ".zip" ) )
         nErr := HB_UNZIPFILEFIRST( hUnzip )
         DO WHILE nErr == 0
            HB_UnzipFileInfo( hUnzip, @cFName )
            IF ( nErr := HB_UnzipExtractCurrentFile( hUnzip, cFName +
"_unzipped", "AnyPassword" ) ) != 0
               Alert( "Error " + hb_NToS( nErr ) )
            ENDIF
            nErr := HB_UNZIPFILENEXT( hUnzip )
         ENDDO
         HB_UNZIPCLOSE( hUnzip )
      ENDIF


-----
Best regards.
Maurizio la Cecilia
-- 
View this message in context: 
http://old.nabble.com/Error-unZipping-a-crypted-archive-tp28364005p28364005.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to