OSDN Git Service

Fixed issue #165: Incorect path to Notepad2
authorFrank Li <lznuaa@gmail.com>
Thu, 10 Sep 2009 14:08:23 +0000 (22:08 +0800)
committerFrank Li <lznuaa@gmail.com>
Thu, 10 Sep 2009 14:08:23 +0000 (22:08 +0800)
This problem happen when there are more than one .git at parent directory path.
 sOrigCWD is not useful for Tortoisegit. It should be g_Git.m_CurrentDir

Signed-off-by: Frank Li <lznuaa@gmail.com>
src/TortoiseProc/AppUtils.cpp
src/TortoiseProc/TortoiseProc.cpp

index 9936016..8d940db 100644 (file)
@@ -609,7 +609,7 @@ bool CAppUtils::LaunchApplication(const CString& sCommandLine, UINT idErrMessage
 \r
        CString cleanCommandLine(sCommandLine);\r
 \r
-       if (CreateProcess(NULL, const_cast<TCHAR*>((LPCTSTR)cleanCommandLine), NULL, NULL, FALSE, 0, 0, sOrigCWD, &startup, &process)==0)\r
+       if (CreateProcess(NULL, const_cast<TCHAR*>((LPCTSTR)cleanCommandLine), NULL, NULL, FALSE, 0, 0, g_Git.m_CurrentDir, &startup, &process)==0)\r
        {\r
                if(idErrMessageFormat != 0)\r
                {\r
index 7ffad03..869de2f 100644 (file)
@@ -106,7 +106,6 @@ CTortoiseProcApp::~CTortoiseProcApp()
 // The one and only CTortoiseProcApp object\r
 CTortoiseProcApp theApp;\r
 HWND hWndExplorer;\r
-CString sOrigCWD;\r
 \r
 BOOL CTortoiseProcApp::CheckMsysGitDir()\r
 {\r
@@ -325,8 +324,8 @@ Click Yes to open setting dialog to setup MSysGit Path"),
                        TCHAR * originalCurrentDirectory = new TCHAR[len];\r
                        if (GetCurrentDirectory(len, originalCurrentDirectory))\r
                        {\r
-                               sOrigCWD = originalCurrentDirectory;\r
-                               sOrigCWD = CPathUtils::GetLongPathname(sOrigCWD);\r
+                               //sOrigCWD = originalCurrentDirectory;\r
+                               //sOrigCWD = CPathUtils::GetLongPathname(sOrigCWD);\r
                        }\r
                        delete [] originalCurrentDirectory;\r
                }\r