Ver código fonte

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

Source commit: 2f2009e86047686c35cee7b4127050c118d01c03
Martin Prikryl 3 anos atrás
pai
commit
840850acd0

+ 1 - 1
source/forms/CustomScpExplorer.cpp

@@ -6824,7 +6824,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

@@ -1640,7 +1640,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;
       }