OSDN Git Service

Fix \n problem at putty key file path
authorFrank Li <lznuaa@gmail.com>
Thu, 2 Apr 2009 14:11:51 +0000 (22:11 +0800)
committerFrank Li <lznuaa@gmail.com>
Thu, 2 Apr 2009 14:11:51 +0000 (22:11 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/TortoiseProc/AppUtils.cpp

index c0967f5..7feffa1 100644 (file)
@@ -621,13 +621,16 @@ bool CAppUtils::LaunchPAgent(CString *keyfile,CString * pRemote)
        if( pRemote == NULL)\r
        {\r
                remote=_T("origin");\r
+       }else\r
+       {\r
+               remote=*pRemote;\r
        }\r
        if(keyfile == NULL)\r
        {\r
                cmd.Format(_T("git.exe config remote.%s.puttykeyfile"),remote);\r
                g_Git.Run(cmd,&key,CP_ACP);\r
                int start=0;\r
-               key.Tokenize(_T("\n"),start);\r
+               key = key.Tokenize(_T("\n"),start);\r
        }\r
        else\r
                key=*keyfile;\r