summaryrefslogtreecommitdiff
path: root/src/fileutils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileutils.cpp')
-rw-r--r--src/fileutils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fileutils.cpp b/src/fileutils.cpp
index ee89cca1c..8a726ba69 100644
--- a/src/fileutils.cpp
+++ b/src/fileutils.cpp
@@ -29,14 +29,14 @@ FileReader::FileReader(const std::string& filename)
void FileReader::Load(const std::string& filename)
{
// If the file is stored in the file cache then we used that version instead.
- std::string realName = ServerInstance->Config->Paths.PrependConfig(filename);
- ConfigFileCache::iterator it = ServerInstance->Config->Files.find(realName);
+ ConfigFileCache::const_iterator it = ServerInstance->Config->Files.find(filename);
if (it != ServerInstance->Config->Files.end())
{
this->lines = it->second;
}
else
{
+ const std::string realName = ServerInstance->Config->Paths.PrependConfig(filename);
lines.clear();
std::ifstream stream(realName.c_str());