summaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-26 19:58:19 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-26 19:58:19 +0000
commitf95aa1c2c5fd3020169a45d8b06622173fd15bce (patch)
treec111105583da5e1e229e60ed30428dc45095272b /src/configreader.cpp
parent3cb0d3f0f84bb9ad56b5724fbef85c5ae7d14d77 (diff)
Brok.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7156 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp6
1 files changed, 5 insertions, 1 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 "/";