Selaa lähdekoodia

FIX: Skipping existing files while copying vs estimated remaining time (fixes #1018)

Alexander Koblov 2 vuotta sitten
vanhempi
commit
a0a21007dd
1 muutettua tiedostoa jossa 12 lisäystä ja 1 poistoa
  1. 12 1
      src/filesources/filesystem/ufilesystemutil.pas

+ 12 - 1
src/filesources/filesystem/ufilesystemutil.pas

@@ -1403,8 +1403,19 @@ begin
       end
     else
       case TargetExists(aNode, AbsoluteTargetFileName) of
+
         fsoterSkip:
-          Result := False;
+        begin
+          with FStatistics do
+          begin
+            Inc(DoneFiles);
+            Dec(TotalBytes, aNode.TheFile.Size);
+            if FVerify and (FMode = fsohmCopy) then
+              Dec(TotalBytes, aNode.TheFile.Size);
+            UpdateStatistics(FStatistics);
+          end;
+          Exit(False);
+        end;
 
         fsoterDeleted, fsoterNotExists:
           Result := MoveOrCopy(aNode.TheFile, AbsoluteTargetFileName, fsohcmDefault);