Browse Source

Logging calculated size of files/directories

Source commit: 7281eed387fa508d85017624d449259efeb8635b
Martin Prikryl 6 years ago
parent
commit
abbc61674f
1 changed files with 9 additions and 0 deletions
  1. 9 0
      source/core/Terminal.cpp

+ 9 - 0
source/core/Terminal.cpp

@@ -4419,6 +4419,10 @@ bool __fastcall TTerminal::CalculateFilesSize(TStrings * FileList,
   Param.AllowDirs = AllowDirs;
   ProcessFiles(FileList, foCalculateSize, DoCalculateFileSize, &Param);
   Size = Param.Size;
+  if (Configuration->ActualLogProtocol >= 1)
+  {
+    LogEvent(FORMAT(L"Size of %d remote files/folders calculated as %s", (FileList->Count, IntToStr(Size))));
+  }
   return Param.Result;
 }
 //---------------------------------------------------------------------------
@@ -5393,6 +5397,11 @@ bool __fastcall TTerminal::CalculateLocalFilesSize(TStrings * FileList,
     OperationStop(OperationProgress);
   }
 
+  if (Configuration->ActualLogProtocol >= 1)
+  {
+    LogEvent(FORMAT(L"Size of %d local files/folders calculated as %s", (FileList->Count, IntToStr(Size))));
+  }
+
   if (OnceDoneOperation != odoIdle)
   {
     CloseOnCompletion(OnceDoneOperation);