diff options
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r-- | src/configreader.cpp | 6 |
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 "/"; |