summaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2013-08-12 09:20:46 -0700
committerAttila Molnar <attilamolnar@hush.com>2013-08-12 09:20:46 -0700
commit9d4efff3957f1ad163f726bc44bed3a4870afb94 (patch)
tree85a67980fb21b7a61756761558fef396adad7dd7 /src/modules.cpp
parentdafa2f3031c4abc7f5506385770c4fc743669b17 (diff)
parent29822a263b3b408559257e9ef2bd29167e7573fa (diff)
Merge pull request #591 from SaberUK/master+config-tweaks
Various patches relating to configuration.
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index 5fc8ffc47..47c994088 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -577,7 +577,8 @@ 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.
- ConfigFileCache::iterator it = ServerInstance->Config->Files.find(filename);
+ std::string realName = ServerInstance->Config->Paths.PrependConfig(filename);
+ ConfigFileCache::iterator it = ServerInstance->Config->Files.find(realName);
if (it != ServerInstance->Config->Files.end())
{
this->lines = it->second;
@@ -586,7 +587,7 @@ void FileReader::Load(const std::string& filename)
{
lines.clear();
- std::ifstream stream(filename.c_str());
+ std::ifstream stream(realName.c_str());
if (!stream.is_open())
throw CoreException(filename + " does not exist or is not readable!");