When m_CurrentDir =C:\, not C:, pathlist calulate wrong.
\r
bool SetCurrentDir(CString path)\r
{\r
- return m_GitDir.HasAdminDir(path,&m_CurrentDir);\r
+ bool b = m_GitDir.HasAdminDir(path,&m_CurrentDir);\r
+ if(m_CurrentDir.GetLength() == 2 && m_CurrentDir[1] == _T(':')) //C: D:\r
+ {\r
+ m_CurrentDir+=_T('\\');\r
+ }\r
+ return b;\r
}\r
CString m_CurrentDir;\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
- \r
+ {\r
+ if(g_Git.m_CurrentDir[g_Git.m_CurrentDir.GetLength()-1] == _T('\\'))\r
+ {\r
+ cmdLinePath.SetFromWin( WinPath.Right(WinPath.GetLength()-g_Git.m_CurrentDir.GetLength()));\r
+ }else\r
+ {\r
+ cmdLinePath.SetFromWin( WinPath.Right(WinPath.GetLength()-g_Git.m_CurrentDir.GetLength()-1));\r
+ }\r
+ }\r
orgPathList = plist; \r
for(int i=0;i<plist.GetCount();i++)\r
{\r
CTGitPath p;\r
if(WinPath.Left(g_Git.m_CurrentDir.GetLength())==g_Git.m_CurrentDir)\r
{\r
- p.SetFromWin( WinPath.Right(WinPath.GetLength()-g_Git.m_CurrentDir.GetLength()-1));\r
+ if(g_Git.m_CurrentDir[g_Git.m_CurrentDir.GetLength()-1] == _T('\\'))\r
+ {\r
+ p.SetFromWin( WinPath.Right(WinPath.GetLength()-g_Git.m_CurrentDir.GetLength()));\r
+ }else\r
+ {\r
+ p.SetFromWin( WinPath.Right(WinPath.GetLength()-g_Git.m_CurrentDir.GetLength()-1));\r
+ }\r
}else\r
p=plist[i];\r
pathList.AddPath(p);\r
\r
STRINGTABLE \r
BEGIN\r
- IDS_MENUSWITCH "S&witch..."\r
+ IDS_MENUSWITCH "S&witch/Checkout..."\r
IDS_MENUMERGE "&Merge..."\r
IDS_MENUBRANCH "Create Branch..."\r
IDS_MENUIMPORT "&Import..."\r
IDS_MENUDESCREVERT "Reverts all changes you made since the last update"\r
IDS_MENUDESCCLEANUP "Cleanup interrupted operations, locked files, ..."\r
IDS_MENUDESCRESOLVE "Resolves conflicted files"\r
- IDS_MENUDESCSWITCH "Switch working copy to another branch / tag"\r
+ IDS_MENUDESCSWITCH "Switch/Checkout working copy to another branch / tag"\r
END\r
\r
STRINGTABLE \r