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
This commit is contained in:
darthgandalf
2010-09-12 17:27:51 +00:00
parent 0b69ae8bd4
commit 62e25df78b

View File

@@ -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;