mirror of
https://github.com/znc/znc.git
synced 2026-08-05 16:33:46 +02:00
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
This commit is contained in:
+1
-3
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user