浏览代码

Bug 1860: Percent sign (%) in PuTTY session settings (such as IPv6 scope syntax) is misinterpreted when importing

https://winscp.net/tracker/1860

Source commit: bcceee79533375f73e8431bb0a0b8411f6097ed5
Martin Prikryl 5 年之前
父节点
当前提交
cdfe45def5
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 2 1
      source/core/HierarchicalStorage.h
  2. 1 1
      source/windows/GUIConfiguration.cpp

+ 2 - 1
source/core/HierarchicalStorage.h

@@ -64,7 +64,6 @@ public:
   __property TStorageAccessMode AccessMode = { read = FAccessMode, write = SetAccessMode };
   __property bool Explicit = { read = FExplicit, write = FExplicit };
   __property bool ForceSave = { read = FForceSave, write = FForceSave };
-  __property bool ForceAnsi = { read = FForceAnsi, write = FForceAnsi };
   __property bool MungeStringValues = { read = FMungeStringValues, write = FMungeStringValues };
   __property UnicodeString Source = { read = GetSource };
   __property bool Temporary = { read = GetTemporary };
@@ -88,6 +87,8 @@ protected:
   int FFakeReadOnlyOpens;
   int FRootAccess;
 
+  __property bool ForceAnsi = { read = FForceAnsi, write = FForceAnsi };
+
   UnicodeString __fastcall GetCurrentSubKey();
   UnicodeString __fastcall GetCurrentSubKeyMunged();
   virtual void __fastcall SetAccessMode(TStorageAccessMode value);

+ 1 - 1
source/windows/GUIConfiguration.cpp

@@ -1377,7 +1377,7 @@ TStoredSessionList * __fastcall TGUIConfiguration::SelectPuttySessionsForImport(
   ImportSessionList->DefaultSettings = Sessions->DefaultSettings;
 
   std::unique_ptr<TRegistryStorage> Storage(new TRegistryStorage(PuttySessionsKey));
-  Storage->ForceAnsi = true;
+  Storage->ConfigureForPutty();
   if (Storage->OpenRootKey(false))
   {
     ImportSessionList->Load(Storage.get(), false, true, true);