summaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-13 00:07:37 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-13 00:07:37 +0000
commit382cac82df89b4fc45340a94968bb3eaeeb5f19b (patch)
tree74fd9dcaa4dd7dc8551774a894b7031cf5bddcd5 /src/configreader.cpp
parent2602f4efbd36f395d2186f9609cbd16734416a67 (diff)
Allow confpath to be a file name in the current directory
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11864 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 7248ff099..b8d675ef1 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -1673,16 +1673,12 @@ bool ServerConfig::DoInclude(const std::string &file, bool allowexeinc)
if ((newfile[0] != '/') && (!StartsWithWindowsDriveLetter(newfile)))
{
- if((pos = confpath.rfind("/")) != std::string::npos)
+ pos = confpath.rfind("/")
+ if(pos != std::string::npos)
{
/* Leaves us with just the path */
newfile = confpath.substr(0, pos) + std::string("/") + newfile;
}
- else
- {
- errstr << "Couldn't get config path from: " << ServerInstance->ConfigFileName << std::endl;
- return false;
- }
}
FILE* conf = fopen(newfile.c_str(), "r");