OSDN Git Service

diff two file okay
authorFrank Li <lznuaa@gmail.com>
Wed, 17 Dec 2008 23:18:05 +0000 (07:18 +0800)
committerFrank Li <lznuaa@gmail.com>
Wed, 17 Dec 2008 23:18:05 +0000 (07:18 +0800)
src/TortoiseProc/Commands/Command.h
src/TortoiseProc/Commands/DiffCommand.cpp

index 183e3ae..588bdf8 100644 (file)
@@ -39,6 +39,7 @@ public:
        void                                    SetParser(const CCmdLineParser& p) {parser = p;}\r
        void                                    SetPaths(const CTGitPathList& plist, const CTGitPath path) \r
                                                        {       \r
        void                                    SetParser(const CCmdLineParser& p) {parser = p;}\r
        void                                    SetPaths(const CTGitPathList& plist, const CTGitPath path) \r
                                                        {       \r
+                                                               orgCmdLinePath = path;\r
                                                                CString WinPath=path.GetWinPath();\r
                                                                if(WinPath.Left(g_Git.m_CurrentDir.GetLength())==g_Git.m_CurrentDir)\r
                                                                        cmdLinePath.SetFromWin( WinPath.Right(WinPath.GetLength()-g_Git.m_CurrentDir.GetLength()-1));\r
                                                                CString WinPath=path.GetWinPath();\r
                                                                if(WinPath.Left(g_Git.m_CurrentDir.GetLength())==g_Git.m_CurrentDir)\r
                                                                        cmdLinePath.SetFromWin( WinPath.Right(WinPath.GetLength()-g_Git.m_CurrentDir.GetLength()-1));\r
@@ -50,6 +51,7 @@ protected:
        CCmdLineParser                  parser;\r
        CTGitPathList                   pathList;\r
        CTGitPath                               cmdLinePath;\r
        CCmdLineParser                  parser;\r
        CTGitPathList                   pathList;\r
        CTGitPath                               cmdLinePath;\r
+       CTGitPath                               orgCmdLinePath;\r
        HWND                                    hwndExplorer;\r
 };\r
 \r
        HWND                                    hwndExplorer;\r
 };\r
 \r
index db596f9..1f4ff69 100644 (file)
@@ -58,7 +58,7 @@ bool DiffCommand::Execute()
        } \r
        else\r
                bRet = CAppUtils::StartExtDiff(\r
        } \r
        else\r
                bRet = CAppUtils::StartExtDiff(\r
-                       path2, cmdLinePath.GetWinPathString(), CString(), CString(),\r
+                       path2, orgCmdLinePath.GetWinPathString(), CString(), CString(),\r
                        CAppUtils::DiffFlags().AlternativeTool(bAlternativeTool));\r
        return bRet;\r
 }
\ No newline at end of file
                        CAppUtils::DiffFlags().AlternativeTool(bAlternativeTool));\r
        return bRet;\r
 }
\ No newline at end of file