FIX: Progress for wcx plugins

This commit is contained in:
Alexander Koblov 2015-04-25 08:46:22 +00:00
commit 4b6a2b60df
2 changed files with 13 additions and 22 deletions

View file

@ -138,24 +138,15 @@ begin
end
else // For plugins which unpack in CloseArchive
begin
if (Size >= -100) and (Size <= -1) then // first percent bar
begin
CurrentFileDoneBytes := CurrentFileTotalBytes * (-Size) div 100;
CurrentFileTotalBytes := 100;
{ if Size = -100 then // File finished
DoneBytes := DoneBytes + WcxCopyOutOperation.FCurrentFileSize;}
//DCDebug('Working ' + FileName + ' Percent1 = ' + IntToStr(FFileOpDlg.iProgress1Pos));
end
else if (Size >= -1100) and (Size <= -1000) then // second percent bar
begin
DoneBytes := TotalBytes * Int64(-Size - 1000) div 100;
//DCDebug('Working ' + FileName + ' Percent2 = ' + IntToStr(FFileOpDlg.iProgress2Pos));
end
else
begin
// DoneBytes := DoneBytes + WcxCopyOutOperation.FCurrentFileSize;
end;
if (Size >= -100) and (Size <= -1) then // total percent bar
begin
DoneBytes := TotalBytes * Int64(-Size) div 100;
end
else if (Size >= -1100) and (Size <= -1000) then // current percent bar
begin
CurrentFileDoneBytes := CurrentFileTotalBytes * (-Size - 1000) div 100;
CurrentFileTotalBytes := 100;
end;
end;
WcxCopyInOperation.UpdateStatistics(WcxCopyInOperation.FStatistics);

View file

@ -167,13 +167,13 @@ begin
end
else // For plugins which unpack in CloseArchive
begin
if (Size >= -100) and (Size <= -1) then // first percent bar
if (Size >= -100) and (Size <= -1) then // total percent bar
begin
CurrentFileDoneBytes := CurrentFileTotalBytes * (-Size) div 100;
DoneBytes := TotalBytes * Int64(-Size) div 100;
end
else if (Size >= -1100) and (Size <= -1000) then // second percent bar
else if (Size >= -1100) and (Size <= -1000) then // current percent bar
begin
DoneBytes := TotalBytes * Int64(-Size - 1000) div 100;
CurrentFileDoneBytes := CurrentFileTotalBytes * (-Size - 1000) div 100;
end;
end;