Changed locations of some paths

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@383 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2005-06-12 09:04:05 +00:00
parent a019a9b439
commit 150d39e534
4 changed files with 22 additions and 16 deletions
+7 -7
View File
@@ -245,22 +245,22 @@ void CZNC::InitDirs(const CString& sArgvPath) {
m_sZNCPath = m_sHomePath + "/.znc";
// Other dirs that we use
m_sDLPath = m_sZNCPath + "/downloads";
m_sConfPath = m_sZNCPath + "/configs";
m_sModPath = m_sZNCPath + "/modules";
m_sDataPath = m_sZNCPath + "/data";
m_sUserPath = m_sZNCPath + "/users";
}
CString CZNC::GetConfigPath(const CString& sConfigFile) {
CString CZNC::ExpandConfigPath(const CString& sConfigFile) {
CString sRetPath;
if (sConfigFile.empty()) {
sRetPath = GetZNCPath() + "/znc.conf";
sRetPath = GetConfPath() + "/znc.conf";
} else {
if (sConfigFile.Left(2) == "./" || sConfigFile.Left(3) == "../") {
sRetPath = GetCurPath() + "/" + sConfigFile;
} else if (sConfigFile.Left(1) != "/") {
sRetPath = GetZNCPath() + "/" + sConfigFile;
sRetPath = GetConfPath() + "/" + sConfigFile;
} else {
sRetPath = sConfigFile;
}
@@ -460,7 +460,7 @@ bool CZNC::WriteNewConfig(const CString& sConfig) {
} while (CUtils::GetBoolInput("Would you like to setup another user?", false));
// !User
CString sConfigFile = GetConfigPath(sConfig);
CString sConfigFile = ExpandConfigPath(sConfig);
CUtils::PrintAction("Writing config [" + sConfigFile + "]");
CFile File(sConfigFile);
@@ -490,7 +490,7 @@ bool CZNC::WriteNewConfig(const CString& sConfig) {
bool CZNC::ParseConfig(const CString& sConfig) {
CString sStatusPrefix;
CString sConfigFile = GetConfigPath(sConfig);
CString sConfigFile = ExpandConfigPath(sConfig);
CUtils::PrintAction("Opening Config [" + sConfigFile + "]");