diff options
| author | 2013-08-12 09:20:46 -0700 | |
|---|---|---|
| committer | 2013-08-12 09:20:46 -0700 | |
| commit | 9d4efff3957f1ad163f726bc44bed3a4870afb94 (patch) | |
| tree | 85a67980fb21b7a61756761558fef396adad7dd7 /src/modules.cpp | |
| parent | Remove virtual User::GetClass() (but keep LocalUser::GetClass()) (diff) | |
| parent | Add <path> keys for all of the compile-time paths. (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.cpp | 5 |
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!"); |
