From f95aa1c2c5fd3020169a45d8b06622173fd15bce Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 26 May 2007 19:58:19 +0000 Subject: Brok. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7156 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/configreader.cpp | 6 +++++- 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) { -- cgit v1.2.3