Преглед изворни кода

Bug 2091: Do not offer to create a link to parent directory, when it happens to be selected, when starting to create a link

https://winscp.net/tracker/2091
(cherry picked from commit 840850acd0d57853d70968504edc0d7323ccbe2b)

Source commit: 72c79e2975c9768a2387dd75dd272603fcc9163c
Martin Prikryl пре 3 година
родитељ
комит
bf6a627be8
2 измењених фајлова са 2 додато и 2 уклоњено
  1. 1 1
      source/forms/CustomScpExplorer.cpp
  2. 1 1
      source/forms/ScpCommander.cpp

+ 1 - 1
source/forms/CustomScpExplorer.cpp

@@ -6628,7 +6628,7 @@ void __fastcall TCustomScpExplorerForm::AddEditLink(TOperationSide Side, bool Ad
       FileName = File->FileName;
       PointTo = File->LinkTo;
     }
-    else
+    else if (!File->IsParentDirectory)
     {
       PointTo = File->FileName;
     }

+ 1 - 1
source/forms/ScpCommander.cpp

@@ -1386,7 +1386,7 @@ void __fastcall TScpCommanderForm::AddEditLink(TOperationSide Side, bool Add)
           throw Exception(FMTLOAD(RESOLVE_SHORTCUT_ERROR, (FullName)));
         }
       }
-      else
+      else if (!ADirView->ItemIsParentDirectory(ADirView->ItemFocused))
       {
         PointTo = FileRec->FileName;
       }