summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 527eb95b0..229d228ca 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -523,7 +523,10 @@ InspIRCd::InspIRCd(int argc, char** argv)
{
#ifdef WIN32
/* Windows can (and defaults to) hide file extensions, so let's play a bit nice for windows users. */
- if (ServerConfig::FileExists(this->ConfigFileName + ".txt"))
+ std::string txtconf = this->ConfigFilename;
+ txtconf.append(".txt");
+
+ if (ServerConfig::FileExists(txtconf.c_str()))
{
strlcat(this->ConfigFileName, ".txt", MAXBUF);
}