summaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
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!");