[delphizip] Re: Error in spanned files

  • From: Alfeu Marcatto <alfeu@xxxxxxxxxxxxxx>
  • To: delphizip@xxxxxxxxxxxxx
  • Date: Fri, 20 Aug 2004 18:42:58 -0300

I think that I understood part of the problem.

The error occur in ZMaster.pas in
    procedure TZMaster.CreateMVFileName(var FileName: string; 
StripPartNbr: Boolean);

During Central Directory build CreateMVFileName is called twice by
       function TZMaster.IsRightDisk: Boolean;
First:  CreateMVFileName('F:\Temp\Teste2.zip', True)
         then the error occur because stripPartNbr is not necessary.
    In CreateMVFileName the routine below extract the extension of file 
name and also striplen (6 characteres and not 3)
        FileName := Copy(FileName, 1, length(FileName) -
          Length(ExtractFileExt(FileName)) - StripLen) +
          Copy(IntToStr(1001 + FDiskNr), 2, 3) + ExtractFileExt(FileName);
    then filename = F:\Temp\Tes007.zip  
Second: CreateMVFileName('F:\Temp\Teste2007.zip', True)
    this is correct because is necessary extract 6 characteres then
    FileName = Teste2.zip       

I change the first striplen to 0 and the error not occur.
Winzip don't expand but ZipMaster expand correctly.

IsRightDisk is called twice by  
    procedure TZMaster.GetNewDisk(DiskSeq: Integer);
    First to DiskSeq = 6 (Copy(IntToStr(1001 + FDiskNr) change to 007)
    Second to DiskSeq = 7 (Copy(IntToStr(1001 + FDiskNr) change to 008)

This both files have part of Central Directory.

I answer your questions below.

Alfeu

Roger Aelbrecht wrote:

>Roger Aelbrecht wrote:
>  
>
>>Alfeu,
>>
>>I think I could manage to have the same kind of error as you did
>>For now it is not necessary to send me the files.
>>I will try to find out what is wrong and how to solve it.
>>
>>    
>>
>
>Unfortunately the error I found is in a peace of code that is only in
>ZipBuilder not in ZipMaster so I still could not reproduce your problem.
>
>To help us is it possible for you to go in debug mode.
>The error you show should normally produce an exception and it would
>help a lot to know at what line that exception is thrown.
>I don't use Delphi so I cannot tell you how to do it.
>
>  
>
procedure TZMaster.GetNewDisk(DiskSeq: Integer);
        raise EZipMaster.CreateResDisp(DS_NoInFile, TRUE)

>2nd question, after the files are created ( whit error), if you start
>a new process and set the file name to Test 2.zip.
>Does it show an error?
>
>  
>
Yes. Same error.

>Can you do an extract/test on this file with ZipMaster?
>If extract/test works then nothing is wrong with the archive.
>
>  
>
Yes. The extract is ok.

>3rd sorry for asking the same thins again but I want to be sure that we
>got the correct information.
>
>>From what I read from all your posting you use as ZipFileName
>FMain.ZipMaster1.ZipFileName := 'F:\Temp\Teste 2.zip';
>
>and you get the error, from you message as
>
>Teste 2 - ERRO 0: Copying: Central Directory
>Teste 2 - ERRO 0: Trace : GetNewDisk Opening: F:\Temp\Test007.zip
>(F:\Temp is the destination directory)
>Teste 2 - ERRO 11001: Input file does not exist
>
>Is the file name F:\Temp\Test007.zip the correct name in the message?
>
>  
>
See above 

>Did ZipMaster create files with names 'Teste 2001.zip' to 'Teste 2008.zip' ?
>
>If all the above filenames are correct we need to find out why ZipMaster is
>looking for 'Test007.zip' were it should look for 'Teste 2007.zip'
>
>
>  
>
I did the test with 'Teste2.zip'

>Roger Aelbrecht
>http://home.tiscali.be/driehoeksw
>
>-----------
>To unsubscribe from this list, send an empty e-mail 
>message to:
>  delphizip-request@xxxxxxxxxxxxx 
>and put the word unsubscribe in the subject.
>
>  
>

-----------
To unsubscribe from this list, send an empty e-mail 
message to:
  delphizip-request@xxxxxxxxxxxxx 
and put the word unsubscribe in the subject.

Other related posts: