Unzip MBS

Sto usando una vecchio zipMBSClass ma ho problema quando dezippo il file

come faccio a sapere se nel file da dezippare vi era una password o no ?
come posso vedere se la password messa è sbagliata , che errore mi genera al livello di codice ??

Grazie

Translation

I am using an old zipMBSClass but I have problem unzipping the file

how do i know if there was a password in the file to be unzipped or not?
how can i see if the entered password is wrong, what error does it generate at the code level ??

Thanks

You pass password for this function:

OpenCurrentFile(password as string)

and check LastError for error code.

hallo
i don’t know how i must do it , please give me example for do it
thnk you

From our unzip with encryption project:

Const password = "Hello"

dim f as FolderItem
dim z as UnZipMBS
dim lines(-1) as string
dim s as string
dim info as UnZipFileInfoMBS

f=SpecialFolder.Desktop.Child("test.zip")
z=new UnZipMBS(f)

lines.Append "Global Comment: "+z.Comment
lines.Append "FileCount: "+str(z.Count)

z.GoToFirstFile
do
  lines.Append "FileOffset: "+str(z.Offset)
  lines.Append "CurrentFileName: "+z.FileName
  
  info=z.FileInfo
  lines.Append "uncompressedSize: "+str(info.uncompressedSize)
  lines.Append "compressedSize: "+str(info.compressedSize)
  lines.Append "date: "+info.date.ShortDate+" "+info.date.ShortTime
  
  z.OpenCurrentFile(password)
  if z.Lasterror=0 then
    lines.Append "GetLocalExtrafield: "+z.GetLocalExtrafield
    lines.Append "eof: "+str(z.eof)
    lines.Append "Position: "+str(z.Position)
    
    s=z.ReadCurrentFile(100000)
    
    'MsgBox s
    
    lines.Append "eof: "+str(z.eof)
    lines.Append "Position: "+str(z.Position)
    
    z.CloseCurrentFile
    
  end if
  z.GoToNextFile
loop until z.Lasterror<>0

EditField1.text=Join(lines,EndOfLine)

Christian I have seen, but it is the same as I have it, and also in this case it does not give any error for Wrong password … it just blocks everything…

i Find for to see this error and block It

Luigi

We found a bug and it will be fixed in next plugins.
So you can detect the CRC error with the wrong password.