summaryrefslogtreecommitdiff
path: root/src/fileutils.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2013-12-18 18:07:30 +0100
committerAttila Molnar <attilamolnar@hush.com>2013-12-18 18:07:30 +0100
commit429a4ddf6ac9fd0f16667ff38a40dc437d9af2d2 (patch)
tree39663a97753606844b164c4ed7a8370d0cae5cd9 /src/fileutils.cpp
parenta1d46b8bffb1dfce883d0a59b67a86934c260fba (diff)
Fix FileReader not working with files specified in <files>
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());