Installer: Reuse any previously set custom Plink path on update installs
authorSebastian Schuberth <sschuberth@gmail.com>
Fri, 15 Mar 2013 08:57:04 +0000 (15 09:57 +0100)
committerSebastian Schuberth <sschuberth@gmail.com>
Fri, 15 Mar 2013 09:10:22 +0000 (15 10:10 +0100)
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
share/WinGit/install.iss

index 9ca535c..a706c8b 100644 (file)
@@ -552,7 +552,10 @@ begin
         EdtPlink:=TEdit.Create(PuTTYPage);\r
         with EdtPlink do begin\r
             Parent:=PuTTYPage.Surface;\r
-            Text:=GetPuTTYLocation;\r
+            Text:=GetPreviousData('Plink Path','');\r
+            if not FileExists(Text) then begin\r
+                Text:=GetPuTTYLocation;\r
+            end;\r
             if not FileExists(Text) then begin\r
                 Text:='';\r
             end;\r
@@ -1227,6 +1230,7 @@ begin
         Data:='OpenSSH';\r
     end else if RdbSSH[GS_Plink].Checked then begin\r
         Data:='Plink';\r
+        SetPreviousData(PreviousDataKey,'Plink Path',EdtPlink.Text);\r
     end;\r
     SetPreviousData(PreviousDataKey,'SSH Option',Data);\r
 \r