From b3df1546d924d5549db7b21216db6d77727f54cb Mon Sep 17 00:00:00 2001 From: Frank Li Date: Thu, 10 Sep 2009 22:08:23 +0800 Subject: [PATCH] Fixed issue #165: Incorect path to Notepad2 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 --- src/TortoiseProc/AppUtils.cpp | 2 +- src/TortoiseProc/TortoiseProc.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/TortoiseProc/AppUtils.cpp b/src/TortoiseProc/AppUtils.cpp index 9936016..8d940db 100644 --- a/src/TortoiseProc/AppUtils.cpp +++ b/src/TortoiseProc/AppUtils.cpp @@ -609,7 +609,7 @@ bool CAppUtils::LaunchApplication(const CString& sCommandLine, UINT idErrMessage CString cleanCommandLine(sCommandLine); - if (CreateProcess(NULL, const_cast((LPCTSTR)cleanCommandLine), NULL, NULL, FALSE, 0, 0, sOrigCWD, &startup, &process)==0) + if (CreateProcess(NULL, const_cast((LPCTSTR)cleanCommandLine), NULL, NULL, FALSE, 0, 0, g_Git.m_CurrentDir, &startup, &process)==0) { if(idErrMessageFormat != 0) { diff --git a/src/TortoiseProc/TortoiseProc.cpp b/src/TortoiseProc/TortoiseProc.cpp index 7ffad03..869de2f 100644 --- a/src/TortoiseProc/TortoiseProc.cpp +++ b/src/TortoiseProc/TortoiseProc.cpp @@ -106,7 +106,6 @@ CTortoiseProcApp::~CTortoiseProcApp() // The one and only CTortoiseProcApp object CTortoiseProcApp theApp; HWND hWndExplorer; -CString sOrigCWD; BOOL CTortoiseProcApp::CheckMsysGitDir() { @@ -325,8 +324,8 @@ Click Yes to open setting dialog to setup MSysGit Path"), TCHAR * originalCurrentDirectory = new TCHAR[len]; if (GetCurrentDirectory(len, originalCurrentDirectory)) { - sOrigCWD = originalCurrentDirectory; - sOrigCWD = CPathUtils::GetLongPathname(sOrigCWD); + //sOrigCWD = originalCurrentDirectory; + //sOrigCWD = CPathUtils::GetLongPathname(sOrigCWD); } delete [] originalCurrentDirectory; } -- 2.11.0