]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Allow confpath to be a file name in the current directory
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 13 Oct 2009 00:07:37 +0000 (00:07 +0000)
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 13 Oct 2009 00:07:37 +0000 (00:07 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11864 e03df62e-2008-0410-955e-edbf42e46eb7

src/configreader.cpp

index 7248ff099c4250e7a2b6745b983011f45a470394..b8d675ef19a7f924b58de516b3c54b2967255cc7 100644 (file)
@@ -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");