浏览代码

Bug 1877: Failure while changing path using path label while another command was executing already

https://winscp.net/tracker/1877

Source commit: 46c7a89d032ea87161c7bca2e833ace98cb823c9
Martin Prikryl 5 年之前
父节点
当前提交
d176689516
共有 2 个文件被更改,包括 26 次插入14 次删除
  1. 4 1
      source/forms/CustomScpExplorer.cpp
  2. 22 13
      source/forms/ScpCommander.cpp

+ 4 - 1
source/forms/CustomScpExplorer.cpp

@@ -6898,7 +6898,10 @@ void __fastcall TCustomScpExplorerForm::WMAppCommand(TMessage & Message)
   {
     if (Command == APPCOMMAND_BROWSER_FAVORITES)
     {
-      OpenDirectory(GetSide(osCurrent));
+      if (!NonVisualDataModule->Busy)
+      {
+        OpenDirectory(GetSide(osCurrent));
+      }
       Message.Result = 1;
     }
     else

+ 22 - 13
source/forms/ScpCommander.cpp

@@ -1785,7 +1785,10 @@ void __fastcall TScpCommanderForm::Resize()
 //---------------------------------------------------------------------------
 void __fastcall TScpCommanderForm::PathLabelDblClick(TObject * Sender)
 {
-  OpenDirectory(Sender == LocalPathLabel ? osLocal : osRemote);
+  if (!NonVisualDataModule->Busy)
+  {
+    OpenDirectory(Sender == LocalPathLabel ? osLocal : osRemote);
+  }
 }
 //---------------------------------------------------------------------------
 void __fastcall TScpCommanderForm::LocalPathLabelGetStatus(
@@ -1805,26 +1808,32 @@ void __fastcall TScpCommanderForm::RemotePathLabelGetStatus(
 void __fastcall TScpCommanderForm::LocalPathLabelPathClick(
   TCustomPathLabel * /*Sender*/, UnicodeString Path)
 {
-  if (SamePaths(Path, LocalDirView->Path))
-  {
-    OpenDirectory(osLocal);
-  }
-  else
+  if (!NonVisualDataModule->Busy)
   {
-    LocalDirView->Path = Path;
+    if (SamePaths(Path, LocalDirView->Path))
+    {
+      OpenDirectory(osLocal);
+    }
+    else
+    {
+      LocalDirView->Path = Path;
+    }
   }
 }
 //---------------------------------------------------------------------------
 void __fastcall TScpCommanderForm::RemotePathLabelPathClick(
   TCustomPathLabel * /*Sender*/, UnicodeString Path)
 {
-  if (UnixSamePath(Path, DirView(osRemote)->Path))
+  if (!NonVisualDataModule->Busy)
   {
-    OpenDirectory(osRemote);
-  }
-  else
-  {
-    DirView(osRemote)->Path = Path;
+    if (UnixSamePath(Path, DirView(osRemote)->Path))
+    {
+      OpenDirectory(osRemote);
+    }
+    else
+    {
+      DirView(osRemote)->Path = Path;
+    }
   }
 }
 //---------------------------------------------------------------------------