znc/znc-0.072-webadmin.diff
2009-07-23 01:56:02 +00:00

21 lines
836 B
Diff

--- znc-0.072/modules/webadmin.cpp 2009-07-21 13:36:33.000000000 -0500
+++ /home/nb/fedora-git/znc-upstream/modules/webadmin.cpp 2009-07-22 20:36:44.736103981 -0500
@@ -253,13 +253,13 @@
CString CWebAdminSock::GetSkinDir() {
CString sAvailSkins = GetAvailSkinsDir();
- CString sSkinDir = sAvailSkins + GetModule()->GetSkinName() + "/";
- CString sDir = CDir::CheckPathPrefix("./", sSkinDir, "/");
+ CString sSkinDir = GetModule()->GetSkinName() + "/";
+ CString sDir = CDir::CheckPathPrefix(sAvailSkins, sSkinDir, "/");
// Via CheckPrefix() we check if someone tries to use e.g. a skin name
// with embed .. or such evilness.
- if (!sDir.empty() && CFile::IsDir(sSkinDir)) {
- return sSkinDir;
+ if (!sDir.empty() && CFile::IsDir(sDir)) {
+ return sDir + "/";
}
return m_pModule->GetModDataDir() + "/skins/default/";