OSDN Git Service

Fixed issue #219: Blame Error when git repository is at root directory and path use "/"
authorFrank Li <lznuaa@gmail.com>
Fri, 6 Nov 2009 04:10:47 +0000 (22:10 -0600)
committerFrank Li <lznuaa@gmail.com>
Fri, 6 Nov 2009 04:10:47 +0000 (22:10 -0600)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/TortoiseGitBlame/TortoiseGitBlameDoc.cpp

index 69aeb60..2df2566 100644 (file)
@@ -90,7 +90,8 @@ BOOL CTortoiseGitBlameDoc::OnOpenDocument(LPCTSTR lpszPathName,CString Rev)
                g_Git.m_CurrentDir=topdir;\r
 \r
                CString PathName=lpszPathName;\r
-               if(topdir[topdir.GetLength()-1] == _T('\\'))\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