瀏覽代碼

Bug 1808: Failure when synchronizing directories after they were previously synchronized while being empty

https://winscp.net/tracker/1808

Source commit: ecde3a9fce036ed9e76c25adf82fcb51f8739871
Martin Prikryl 6 年之前
父節點
當前提交
a0190e30c5
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      source/forms/SynchronizeProgress.cpp

+ 1 - 1
source/forms/SynchronizeProgress.cpp

@@ -105,7 +105,7 @@ int __fastcall TSynchronizeProgressForm::SetData(
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------
 int __fastcall TSynchronizeProgressForm::CalculateProgress()
 int __fastcall TSynchronizeProgressForm::CalculateProgress()
 {
 {
-  return ((OperationProgress->Style == pbstMarquee) ? -1 : ((OperationProgress->Position * 100) / OperationProgress->Max));
+  return (((OperationProgress->Style == pbstMarquee) || (OperationProgress->Max == 0)) ? -1 : ((OperationProgress->Position * 100) / OperationProgress->Max));
 }
 }
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------
 void __fastcall TSynchronizeProgressForm::UpdateControls()
 void __fastcall TSynchronizeProgressForm::UpdateControls()