| 151 |
|
begin |
| 152 |
|
ShowMessage('Couldn''t delete file. Aborting'); |
| 153 |
|
Exit; |
| 154 |
– |
end else if not DeleteFile(AnsiReplaceStr(Target, '.dat', '.raw')) then |
| 155 |
– |
begin |
| 156 |
– |
ShowMessage('Couldn''t delete file. Aborting'); |
| 157 |
– |
Exit; |
| 158 |
– |
end else if not DeleteFile(AnsiReplaceStr(Target, '.dat', '.sep')) then |
| 159 |
– |
begin |
| 160 |
– |
ShowMessage('Couldn''t delete file. Aborting'); |
| 161 |
– |
Exit; |
| 154 |
|
end; |
| 155 |
+ |
if FileExists(AnsiReplaceStr(Target, '.dat', '.raw')) then |
| 156 |
+ |
if not DeleteFile(AnsiReplaceStr(Target, '.dat', '.raw')) then |
| 157 |
+ |
begin |
| 158 |
+ |
ShowMessage('Couldn''t delete file. Aborting'); |
| 159 |
+ |
Exit; |
| 160 |
+ |
end; |
| 161 |
+ |
if FileExists(AnsiReplaceStr(Target, '.dat', '.sep')) then |
| 162 |
+ |
if Connection.DataOS in [DOS_WINDEMO, DOS_MAC, DOS_MACBETA] then |
| 163 |
+ |
if not DeleteFile(AnsiReplaceStr(Target, '.dat', '.sep')) then |
| 164 |
+ |
begin |
| 165 |
+ |
ShowMessage('Couldn''t delete file. Aborting'); |
| 166 |
+ |
Exit; |
| 167 |
+ |
end; |
| 168 |
|
end else begin |
| 169 |
|
ShowMessage('Aborting'); |
| 170 |
|
Exit; |
| 348 |
|
FilesHeader[i].FileSize := fileinfo.Size; |
| 349 |
|
FilesHeader[i].FileType := fileinfo.FileType; |
| 350 |
|
|
| 351 |
< |
if ((i mod 10) = 0) and (i >= 100) then |
| 351 |
> |
if ((FileID mod 10) = 0) and (FileID >= 100) then |
| 352 |
|
lbl_estimation.Caption := 'Estimated time left: ' + TimeToStr( |
| 353 |
< |
(Time - FileTime) / i * (progress.Max - i + 1) * 1.1, TimeFormat ); |
| 354 |
< |
progress.Position := i + 1; |
| 355 |
< |
lbl_progress.Caption := 'Files done: ' + IntToStr(i + 1) + '/' + IntToStr(progress.Max); |
| 353 |
> |
(Time - FileTime) / FileID * (progress.Max - FileID + 1) * 1.1, TimeFormat ); |
| 354 |
> |
progress.Position := FileID + 1; |
| 355 |
> |
lbl_progress.Caption := 'Files done: ' + IntToStr(FileID + 1) + '/' + IntToStr(progress.Max); |
| 356 |
|
Application.ProcessMessages; |
| 357 |
|
end; |
| 358 |
|
|