Browse Source

Bug 1826: Failure when loading extension with filename containing some special characters (like a dash)

https://winscp.net/tracker/1826

Source commit: 640650e317dd6429e100a6cd9808219df487daec
Martin Prikryl 5 years ago
parent
commit
b50e410e0b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      source/forms/NonVisual.cpp

+ 2 - 1
source/forms/NonVisual.cpp

@@ -1063,8 +1063,9 @@ int __fastcall TNonVisualDataModule::CreateCustomCommandsListMenu(
         UnicodeString Name = ExtractFileName(Command->Id);
         if (Name.IsEmpty())
         {
-          Name = MakeIdent(Command->Name);
+          Name = Command->Name;
         }
+        Name = MakeIdent(Name);
         Name += L"CustomCommand";
         // This is only the last resort to avoid run-time errors.
         // If there are duplicates, button hidding won't be deterministic.