From 649dca204f960f52c583c9e0bcccc2183970bc6b Mon Sep 17 00:00:00 2001 From: psychon Date: Mon, 2 Feb 2009 15:24:48 +0000 Subject: [PATCH] HTTPSock: Use TrimLeft() instead of a combination of Left() and LeftChomp() git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1364 726aef4b-f618-498e-8847-2d620e286838 --- HTTPSock.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/HTTPSock.cpp b/HTTPSock.cpp index b8df7e82..f62f0a9b 100644 --- a/HTTPSock.cpp +++ b/HTTPSock.cpp @@ -116,9 +116,7 @@ bool CHTTPSock::PrintFile(const CString& sFileName, CString sContentType) { CString sFilePath = sFileName; if (!m_sDocRoot.empty()) { - while (sFilePath.Left(1) == "/") { - sFilePath.LeftChomp(1); - } + sFilePath.TrimLeft("/"); sFilePath = CDir::ChangeDir(m_sDocRoot, sFilePath, m_sDocRoot);