瀏覽代碼

Bug 1656: File mask is not considered when calculating total file transfer size when deleting original files

https://winscp.net/tracker/1656

Source commit: 55b6ea14efad8feaea089331919628a97cff8342
Martin Prikryl 7 年之前
父節點
當前提交
6f766817ee
共有 1 個文件被更改,包括 2 次插入10 次删除
  1. 2 10
      source/core/Terminal.cpp

+ 2 - 10
source/core/Terminal.cpp

@@ -6560,12 +6560,8 @@ bool __fastcall TTerminal::CopyToRemote(TStrings * FilesToCopy,
       Files.reset(new TStringList());
       Files->OwnsObjects = true;
     }
-    // dirty trick: when moving, do not pass copy param to avoid exclude mask
     bool CalculatedSize =
-      CalculateLocalFilesSize(
-        FilesToCopy, Size,
-        (FLAGCLEAR(Params, cpDelete) ? CopyParam : NULL),
-        CopyParam->CalculateSize, Files.get());
+      CalculateLocalFilesSize(FilesToCopy, Size, CopyParam, CopyParam->CalculateSize, Files.get());
 
     FLastProgressLogged = GetTickCount();
     TFileOperationProgressType OperationProgress(&DoProgress, &DoFinished);
@@ -7016,13 +7012,9 @@ bool __fastcall TTerminal::CopyToLocal(TStrings * FilesToCopy,
     ExceptionOnFail = true;
     try
     {
-      // dirty trick: when moving, do not pass copy param to avoid exclude mask
       TCalculateSizeStats Stats;
       Stats.FoundFiles = Files.get();
-      if (CalculateFilesSize(
-           FilesToCopy, TotalSize, csIgnoreErrors,
-           (FLAGCLEAR(Params, cpDelete) ? CopyParam : NULL),
-           CopyParam->CalculateSize, Stats))
+      if (CalculateFilesSize(FilesToCopy, TotalSize, csIgnoreErrors, CopyParam, CopyParam->CalculateSize, Stats))
       {
         TotalSizeKnown = true;
       }