[delphizip] Re: Reproducible bug in ZipMstr.pas 1.73

  • From: "Roger Aelbrecht" <Aelbrecr@xxxxxxxxxx>
  • To: <delphizip@xxxxxxxxxxxxx>
  • Date: Tue, 24 Aug 2004 20:33:21 +0200

Peter Aschbacher wrote:
> When trying to create a normal standard zip archive on a removable
> disk:
>
> When executing the following line ZipMaster raises an exception:
>
> ZipMaster1.ZipComment :=3D 'My comment';
>
> This exception occurs only when creating a zip archive on a removable
> = disk,
> it does not occur on fixed disk (harddisk).
>
> These are the the lines in  ZipMstr.pas where the exception is raised:
>
> //*************************** Line # 865
> else                    // if we have an MV archive copied to a =
> removable
> disk
>       begin
>         // accept any MV filename on disk
>         sName :=3D NameOfPart(Fname, false);
>         if sName =3D '' then
>           sName :=3D NameOfPart(Fname, true);
>         if sName =3D '' then    // none
>           raise EZipMaster.CreateResDisp(DS_FileOpen, true);
> //***************************
>
> Please note: The zip archive is NOT a MV (MultiVolume) archive! =
> (SpanOptions
> are []).
>
> The version in the ZipMstr.pas file is indicated as:
>
> v1.73 by Russell Peters October 3, 2003
>
> When debugging the program and hovering the mouse over <ZipComment>
> in = the
> line of my program:
> ZipMaster1.ZipComment :=3D 'My comment';
> the yellow hint tells that the linker has removed the function:
> TZipMaster.GetZipComment
> !!!!!
>
> Regards,
> Peter
>
>
> -----------
> To unsubscribe from this list, send an empty e-mail
> message to:
>   delphizip-request@xxxxxxxxxxxxx
> and put the word unsubscribe in the subject.

I was trying to reproduce your problem on my version of ZipMaster 1.73
and my test envirinment and I did not get the error but I remeber I could
not
create the error the first time it was reported, probably because I use the
BCB compiler.

But going trough the code I noticed an important change that was not in 1.73
The part you shown above is changed in
if sName = '' then                  // none
          //          raise EZipMaster.CreateResDisp(DS_FileOpen, true);
        begin                               // 1.75 RA
          if not AllowNotExists then
            raise EZipMaster.CreateResDisp(DS_FileOpen, TRUE);
          Result := 1;
          exit;
        end;
        FileName := Path + sName;

Since my initials are in the comment I think I found an error here during
testing
of version 1.75

HTH


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.

Other related posts: