From 1c7bf4e166b96306f02a40eea3ef74a80c71009f Mon Sep 17 00:00:00 2001 From: Frank Li Date: Fri, 12 Dec 2008 22:37:19 +0800 Subject: [PATCH] Fix PathList Miss Problem Signed-off-by: Frank Li --- src/TortoiseProc/Commands/CommitCommand.cpp | 3 +++ src/TortoiseProc/Commands/LogCommand.cpp | 6 +++++- src/TortoiseProc/TortoiseProc.cpp | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/TortoiseProc/Commands/CommitCommand.cpp b/src/TortoiseProc/Commands/CommitCommand.cpp index 80c7ece..60d6f50 100644 --- a/src/TortoiseProc/Commands/CommitCommand.cpp +++ b/src/TortoiseProc/Commands/CommitCommand.cpp @@ -66,6 +66,9 @@ bool CommitCommand::Execute() } } #endif + if(pathList.GetCount()>0) + g_Git.m_CurrentDir=pathList[0].GetWinPathString(); + while (bFailed) { bFailed = false; diff --git a/src/TortoiseProc/Commands/LogCommand.cpp b/src/TortoiseProc/Commands/LogCommand.cpp index e19501e..cea3782 100644 --- a/src/TortoiseProc/Commands/LogCommand.cpp +++ b/src/TortoiseProc/Commands/LogCommand.cpp @@ -64,7 +64,11 @@ bool LogCommand::Execute() { bStrict = TRUE; } -#endif +#endif + + if(pathList.GetCount()>0) + g_Git.m_CurrentDir=pathList[0].GetWinPathString(); + CLogDlg dlg; theApp.m_pMainWnd = &dlg; // dlg.SetParams(cmdLinePath, pegrev, revstart, revend, limit, bStrict); diff --git a/src/TortoiseProc/TortoiseProc.cpp b/src/TortoiseProc/TortoiseProc.cpp index 6ee7fb0..8dd922d 100644 --- a/src/TortoiseProc/TortoiseProc.cpp +++ b/src/TortoiseProc/TortoiseProc.cpp @@ -239,7 +239,7 @@ BOOL CTortoiseProcApp::InitInstance() CTGitPathList pathList; if ( parser.HasKey(_T("pathfile")) ) { -#if 0 + CString sPathfileArgument = CPathUtils::GetLongPathname(parser.GetVal(_T("pathfile"))); cmdLinePath.SetFromUnknown(sPathfileArgument); if (pathList.LoadFromFile(cmdLinePath)==false) @@ -252,7 +252,7 @@ BOOL CTortoiseProcApp::InitInstance() // This was a path to a temporary file - it's got no meaning now, and // anybody who uses it again is in for a problem... cmdLinePath.Reset(); -#endif + } else { -- 2.11.0