diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-26 20:03:12 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-26 20:03:12 +0000 |
commit | b4f3cb5c4b25be311952216fab1c66007a9691e7 (patch) | |
tree | 222a66ff55a9c540ef4ef24b5d8c1517f8f77bcb /src | |
parent | f95aa1c2c5fd3020169a45d8b06622173fd15bce (diff) |
Works for me now, please test
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7157 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/configreader.cpp | 7 |
1 files 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); } |