void CTGitPath::SetFromWin(const CString& sPath) { Reset(); m_sBackslashPath = sPath; m_sBackslashPath.Replace(L"\\\\?\\", L""); SanitizeRootPath(m_sBackslashPath, false); }
void CTSVNPath::SetBackslashPath(const CString& sPath) const { m_sBackslashPath = sPath; m_sBackslashPath.Replace('/', '\\'); m_sBackslashPath.TrimRight('\\'); SanitizeRootPath(m_sBackslashPath, false); }
void CTGitPath::SetBackslashPath(const CString& sPath) const { CString path = sPath; path.Replace('/', '\\'); path.TrimRight('\\'); SanitizeRootPath(path, false); m_sBackslashPath = path; }
void CTGitPath::SetFromWin(const CString& sPath, bool bIsDirectory) { Reset(); m_sBackslashPath = sPath; m_bIsDirectory = bIsDirectory; m_bDirectoryKnown = true; SanitizeRootPath(m_sBackslashPath, false); }
void CTGitPath::SetFromWin(LPCTSTR pPath, bool bIsDirectory) { Reset(); m_sBackslashPath = pPath; m_bIsDirectory = bIsDirectory; m_bDirectoryKnown = true; SanitizeRootPath(m_sBackslashPath, false); }
void CTGitPath::SetFromWin(LPCTSTR pPath) { Reset(); m_sBackslashPath = pPath; m_sBackslashPath.Replace(L"\\\\?\\", L""); SanitizeRootPath(m_sBackslashPath, false); ATLASSERT(m_sBackslashPath.Find('/')<0); }
void CTGitPath::SetFromGit(const CString& sPath,CString *oldpath) { Reset(); m_sFwdslashPath = sPath; SanitizeRootPath(m_sFwdslashPath, true); if(oldpath) m_sOldFwdslashPath = *oldpath; }
void CTSVNPath::SetFromSVN(const char* pPath) { Reset(); if (pPath == NULL) return; m_sFwdslashPath = CUnicodeUtils::GetUnicode(pPath); SanitizeRootPath(m_sFwdslashPath, true); }
void CTGitPath::SetFromGit(const TCHAR* pPath, bool bIsDirectory) { Reset(); if (pPath) { m_sFwdslashPath = pPath; SanitizeRootPath(m_sFwdslashPath, true); } m_bDirectoryKnown = true; m_bIsDirectory = bIsDirectory; }
void CTGitPath::SetFromGit(const char* pPath) { Reset(); if (pPath == NULL) return; int len = MultiByteToWideChar(CP_UTF8, 0, pPath, -1, NULL, 0); if (len) { len = MultiByteToWideChar(CP_UTF8, 0, pPath, -1, m_sFwdslashPath.GetBuffer(len+1), len+1); m_sFwdslashPath.ReleaseBuffer(len-1); } SanitizeRootPath(m_sFwdslashPath, true); }
void CTSVNPath::SetFwdslashPath(const CString& sPath) const { m_sFwdslashPath = sPath; m_sFwdslashPath.Replace('\\', '/'); // We don't leave a trailing / m_sFwdslashPath.TrimRight('/'); m_sFwdslashPath.Replace(L"//?/", L""); SanitizeRootPath(m_sFwdslashPath, true); m_sFwdslashPath.Replace(L"file:////", L"file://"); m_sUTF8FwdslashPath.Empty(); }
void CTSVNPath::SetFromSVN(const CString& sPath) { Reset(); m_sFwdslashPath = sPath; SanitizeRootPath(m_sFwdslashPath, true); }