X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=src%2FTGitCache%2FCachedDirectory.cpp;h=c85ae6efa18ab236e243f8dfb48658c1e94d83e0;hb=714cc565f98929acc6f98d6b1279551f1e05b8b1;hp=6460789f9dcd3b0d848c0a64623a414663e434c2;hpb=8cc536d6e50c6d3b7089128916843b015eef4c84;p=tortoisegit%2FTortoiseGitJp.git diff --git a/src/TGitCache/CachedDirectory.cpp b/src/TGitCache/CachedDirectory.cpp index 6460789..c85ae6e 100644 --- a/src/TGitCache/CachedDirectory.cpp +++ b/src/TGitCache/CachedDirectory.cpp @@ -409,8 +409,11 @@ CStatusCacheEntry CCachedDirectory::GetStatusForMember(const CTGitPath& path, bo CString s = m_directoryPath.GetDirectory().GetWinPathString(); if (s.GetLength() > sProjectRoot.GetLength()) { - sSubPath = s.Right(s.GetLength() - sProjectRoot.GetLength() - 1/*otherwise it gets initial slash*/); + sSubPath = s.Right(s.GetLength() - sProjectRoot.GetLength()); lpszSubPath = sSubPath; + // skip initial slash if necessary + if (*lpszSubPath == _T('\\')) + lpszSubPath++; } //MessageBoxA(NULL, CStringA(sProjectRoot), sSubPath, MB_OK); //OutputDebugStringA("###");OutputDebugStringW(sProjectRoot);OutputDebugStringA(" - ");OutputDebugStringA(sSubPath);OutputDebugStringA("\r\n");