[delphizip] Re: FSpecArgs.Add

  • From: Alistair George <bigal@xxxxxxxxxx>
  • To: Russell Peters <delphizip@xxxxxxxxxxxxx>
  • Date: Sat, 30 Nov 2002 20:40:51 +1300

Hello Russell,
I have been wrong many a time but suspect the following is interfering with
backup to CDRW:
function TZipMaster.IsRightDisk(drt: Integer): Boolean;
var
    Ext: string;
begin
    Result := False;
    // For fixed disks the disk is always right, we only need to change
    // the filename.
    if (drt = DRIVE_FIXED) or (drt = DRIVE_REMOTE) then //or (drt = 
DRIVE_CDROM) then
HERE......................................................^^^^^^^^^^^^^^^^^^^^^

Also, am getting error overflow and wondered if it could be caused by the
following (label FROM HERE):
procedure TZipMaster.GetNewDisk(DiskSeq: Integer);
var
    drt: Integer;
begin
    drt := DRIVE_REMOVABLE;
    FileClose(FInFileHandle);           // Close the file on the old disk first.
    FDiskNr := DiskSeq;
    repeat
        if FInFileHandle = -1 then
        begin
            if (drt <> DRIVE_FIXED) and (drt <> DRIVE_REMOTE) then
                ShowZipMessage(DS_NoInFile, '')
                    // This prevents and endless loop if for some reason 
spanned parts
// on harddisk are missing.
            else
                raise E_ZipMaster.CreateResDisp(DS_NoInFile, True);
        end;

FROM HERE
        repeat
            FNewDisk := True;
            drt := CheckForDisk(false);                 // 1.70 changed
        until IsRightDisk(drt);
TO HERE?????

        // Open the the input archive on this disk.
        FInFileHandle := FileOpen(FInFileName, fmShareDenyWrite or fmOpenRead);
    until not (FInFileHandle = -1);
end;

Could the repeat loop be polling and causing an overflow?
-- 
Regards,
 Alistair+


Other related posts: