mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Copy progress when file has alternate data streams
This commit is contained in:
parent
f1ce954f90
commit
844cb52810
1 changed files with 18 additions and 10 deletions
|
|
@ -284,17 +284,25 @@ function FileCopyProgress(TotalBytes, DoneBytes: Int64; UserData: Pointer): Long
|
|||
var
|
||||
Helper: TFileSystemOperationHelper absolute UserData;
|
||||
begin
|
||||
if (DoneBytes > 0) then
|
||||
Helper.FStatistics.DoneBytes+= (DoneBytes - Helper.FStatistics.CurrentFileDoneBytes);
|
||||
with Helper do
|
||||
begin
|
||||
FStatistics.DoneBytes+= (DoneBytes - FStatistics.CurrentFileDoneBytes);
|
||||
|
||||
//Helper.FStatistics.CurrentFileTotalBytes:= TotalBytes;
|
||||
Helper.FStatistics.CurrentFileDoneBytes:= DoneBytes;
|
||||
Helper.UpdateStatistics(Helper.FStatistics);
|
||||
try
|
||||
Helper.CheckOperationState;
|
||||
except
|
||||
on E: EFileSourceOperationAborting do
|
||||
Exit(False);
|
||||
// File has alternate data streams
|
||||
if TotalBytes > FStatistics.CurrentFileTotalBytes then
|
||||
begin
|
||||
FStatistics.TotalBytes+= (TotalBytes - FStatistics.CurrentFileTotalBytes);
|
||||
FStatistics.CurrentFileTotalBytes:= TotalBytes;
|
||||
end;
|
||||
|
||||
FStatistics.CurrentFileDoneBytes:= DoneBytes;
|
||||
UpdateStatistics(FStatistics);
|
||||
try
|
||||
CheckOperationState;
|
||||
except
|
||||
on E: EFileSourceOperationAborting do
|
||||
Exit(False);
|
||||
end;
|
||||
end;
|
||||
Result:= True;
|
||||
end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue