CString s = m_directoryPath.GetDirectory().GetWinPathString();\r
if (s.GetLength() > sProjectRoot.GetLength())\r
{\r
- sSubPath = s.Right(s.GetLength() - sProjectRoot.GetLength() - 1/*otherwise it gets initial slash*/);\r
+ sSubPath = s.Right(s.GetLength() - sProjectRoot.GetLength());\r
lpszSubPath = sSubPath;\r
+ // skip initial slash if necessary\r
+ if (*lpszSubPath == _T('\\'))\r
+ lpszSubPath++;\r
}\r
//MessageBoxA(NULL, CStringA(sProjectRoot), sSubPath, MB_OK);\r
//OutputDebugStringA("###");OutputDebugStringW(sProjectRoot);OutputDebugStringA(" - ");OutputDebugStringA(sSubPath);OutputDebugStringA("\r\n");\r