diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-26 19:58:19 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-26 19:58:19 +0000 |
commit | f95aa1c2c5fd3020169a45d8b06622173fd15bce (patch) | |
tree | c111105583da5e1e229e60ed30428dc45095272b | |
parent | 3cb0d3f0f84bb9ad56b5724fbef85c5ae7d14d77 (diff) |
Brok.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7156 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/configreader.cpp | 6 | ||||
-rw-r--r-- | src/helperfuncs.cpp | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index d35e1f5fe..6407a98e0 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -1613,7 +1613,11 @@ std::string ServerConfig::GetFullProgDir() if (remainder[0] == '/') return remainder; - return std::string(buffer) + "/" + remainder; + std::string fullpath = std::string(buffer) + "/" + remainder; + + std::string::size_type n = fullpath.rfind("/inspircd"); + + return std::string(fullpath, 0, n); } return "/"; diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index f8ecc3b48..5aeabfd8b 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -431,7 +431,7 @@ bool InspIRCd::IsIdent(const char* n) void InspIRCd::OpenLog(char** argv, int argc) { - Config->MyDir = ServerConfig::GetFullProgDir(); + Config->MyDir = Config->GetFullProgDir(); if (!*this->LogFileName) { |