From b4f3cb5c4b25be311952216fab1c66007a9691e7 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 26 May 2007 20:03:12 +0000 Subject: Works for me now, please test git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7157 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/configreader.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/configreader.cpp b/src/configreader.cpp index 6407a98e0..1976baf37 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -1611,12 +1611,13 @@ std::string ServerConfig::GetFullProgDir() /* Does argv[0] start with /? its a full path, use it */ if (remainder[0] == '/') - return remainder; + { + std::string::size_type n = remainder.rfind("/inspircd"); + return std::string(remainder, 0, n); + } std::string fullpath = std::string(buffer) + "/" + remainder; - std::string::size_type n = fullpath.rfind("/inspircd"); - return std::string(fullpath, 0, n); } -- cgit v1.2.3