OSDN Git Service

Update version number to 1.2.1.0
[tortoisegit/TortoiseGitJp.git] / src / TortoiseGitBlame / TortoiseGitBlameDoc.cpp
index 20c1a09..2df2566 100644 (file)
@@ -90,13 +90,19 @@ BOOL CTortoiseGitBlameDoc::OnOpenDocument(LPCTSTR lpszPathName,CString Rev)
                g_Git.m_CurrentDir=topdir;\r
 \r
                CString PathName=lpszPathName;\r
-               PathName=PathName.Right(PathName.GetLength()-g_Git.m_CurrentDir.GetLength()-1);\r
+               if(topdir[topdir.GetLength()-1] == _T('\\') || \r
+                       topdir[topdir.GetLength()-1] == _T('/'))\r
+                       PathName=PathName.Right(PathName.GetLength()-g_Git.m_CurrentDir.GetLength());\r
+               else\r
+                       PathName=PathName.Right(PathName.GetLength()-g_Git.m_CurrentDir.GetLength()-1);\r
+\r
                CTGitPath path;\r
                path.SetFromWin(PathName);\r
 \r
                if(!g_Git.m_CurrentDir.IsEmpty())\r
                        SetCurrentDirectory(g_Git.m_CurrentDir);\r
                \r
+               m_GitPath = path;\r
                GetMainFrame()->m_wndOutput.LoadHistory(path.GetGitPathString());\r
        \r
                CString cmd;\r