summaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 2ee6ace26..5b582b713 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -1889,11 +1889,13 @@ bool ServerConfig::ReadFile(file_cache &F, const char* fname)
std::string confpath = ServerInstance->ConfigFileName;
std::string newfile = fname;
- if ((pos = confpath.rfind("/")) != std::string::npos)
+ if (((pos = confpath.rfind("/"))) != std::string::npos)
newfile = confpath.substr(0, pos) + std::string("/") + fname;
- else if ((pos = confpath.rfind("\\")) != std::string::npos)
+ else if (((pos = confpath.rfind("\\"))) != std::string::npos)
newfile = confpath.substr(0, pos) + std::string("\\") + fname;
+ ServerInstance->Logs->Log("config", DEBUG, "Filename: %s", newfile.c_str());
+
if (!FileExists(newfile.c_str()))
return false;
file = fopen(newfile.c_str(), "r");
@@ -1914,10 +1916,7 @@ bool ServerConfig::ReadFile(file_cache &F, const char* fname)
else
*linebuf = 0;
- if (!feof(file))
- {
- F.push_back(*linebuf ? linebuf : " ");
- }
+ F.push_back(*linebuf ? linebuf : " ");
}
fclose(file);