Page 1 of 1

Validate ZIP before opening it

PostPosted: Tue Feb 28, 2023 11:20 pm
by Armando
Hello friends of the forum:

Is there a function in Harbor that allows you to check if a ZIP file is damaged or corrupt?
before trying to open it?

Greetings

Re: Validate ZIP before opening it

PostPosted: Wed Mar 01, 2023 8:31 am
by Jimmy
hi,

every "Packer" have Option
-t Test .ZIP file integrity


---

as long "Standard" Compression is used all "Packer" can handle it but when change Compression Mode there might be Problem
but "max" Compression is not real need any more since "big" HDD/SDD and quick Internet

so "just use ZIP as "Envelope""

Re: Validate ZIP before opening it

PostPosted: Wed Mar 01, 2023 9:14 am
by Enrico Maria Giordano
Armando wrote:Hello friends of the forum:

Is there a function in Harbor that allows you to check if a ZIP file is damaged or corrupt?
before trying to open it?

Greetings


Just try to unzip the ZIP file with HB_UNZIPFILE() and check the return value.

Re: Validate ZIP before opening it

PostPosted: Wed Mar 08, 2023 8:33 pm
by karinha
Intenta con:

Code: Select all  Expand view

   ? "The comment in test.zip is:", hb_GetZipComment( "test.zip" )
 


https://harbour.github.io/doc/hbziparc.html

Regards, saludos.