From 62e25df78b2e96ca249bd0551addaf526798b37c Mon Sep 17 00:00:00 2001 From: darthgandalf Date: Sun, 12 Sep 2010 17:27:51 +0000 Subject: [PATCH] Make embedded web stuff to work even after install. Thanks to un1matr1x for reporting this. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2134 726aef4b-f618-498e-8847-2d620e286838 --- WebModules.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/WebModules.cpp b/WebModules.cpp index d4539e30..b2c433cf 100644 --- a/WebModules.cpp +++ b/WebModules.cpp @@ -294,8 +294,9 @@ VCString CWebSock::GetDirs(CModule* pModule, bool bIsTemplate) { CString CWebSock::FindTmpl(CModule* pModule, const CString& sName) { VCString vsDirs = GetDirs(pModule, true); for (size_t i = 0; i < vsDirs.size(); ++i) { - if (CFile::Exists(vsDirs[i] + sName)) { - return vsDirs[i] + sName; + CString sFilePath(CDir::ChangeDir(vsDirs[i], sName)); + if (CFile::Exists(sFilePath)) { + return sFilePath; } } return sName;