Browse Source

* patch by alligator: avoid unncessary calls to CalcTotalSize

florian 1 year ago
parent
commit
ebf39d6109
1 changed files with 2 additions and 1 deletions
  1. 2 1
      packages/paszlib/src/zipper.pp

+ 2 - 1
packages/paszlib/src/zipper.pp

@@ -2917,7 +2917,8 @@ Begin
     Try
       ReadZipDirectory;
       FTotPos := 0;
-      FTotSize := CalcTotalSize(AllFiles);
+      if Assigned(FOnProgressEx) and not Terminated then
+        FTotSize := CalcTotalSize(AllFiles);
       i:=0;
       While (I<FEntries.Count) and not Terminated do
         begin