Changeset 130 for oup


Ignore:
Timestamp:
Mar 28, 2007, 3:17:24 AM (18 years ago)
Author:
alloc
Message:
 
Location:
oup/current
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • oup/current/Helper/LevelDB.pas

    r129 r130  
    156156        ShowMessage('Couldn''t delete file. Aborting');
    157157        Exit;
    158       end else if not DeleteFile(AnsiReplaceStr(Target, '.dat', '.sep')) then
     158      end else if Connection.DataOS in [DOS_WINDEMO, DOS_MAC, DOS_MACBETA] then
    159159      begin
    160         ShowMessage('Couldn''t delete file. Aborting');
    161         Exit;
     160        if not DeleteFile(AnsiReplaceStr(Target, '.dat', '.sep')) then
     161        begin
     162          ShowMessage('Couldn''t delete file. Aborting');
     163          Exit;
     164        end;
    162165      end;
    163166    end else begin
     
    344347    FilesHeader[i].FileType := fileinfo.FileType;
    345348
    346     if ((i mod 10) = 0) and (i >= 100) then
     349    if ((FileID mod 10) = 0) and (FileID >= 100) then
    347350      lbl_estimation.Caption := 'Estimated time left: ' + TimeToStr(
    348         (Time - FileTime) / i * (progress.Max - i + 1) * 1.1, TimeFormat );
    349     progress.Position := i + 1;
    350     lbl_progress.Caption := 'Files done: ' + IntToStr(i + 1) + '/' + IntToStr(progress.Max);
     351        (Time - FileTime) / FileID * (progress.Max - FileID + 1) * 1.1, TimeFormat );
     352    progress.Position := FileID + 1;
     353    lbl_progress.Caption := 'Files done: ' + IntToStr(FileID + 1) + '/' + IntToStr(progress.Max);
    351354    Application.ProcessMessages;
    352355  end;
Note: See TracChangeset for help on using the changeset viewer.