aboutsummaryrefslogtreecommitdiffstats
path: root/src/configreader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index e71c22f59..110dc9172 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -96,10 +96,12 @@ ServerConfig::ServerConfig()
ServerConfig::ReadResult ServerConfig::ReadFile(const std::string& file, bool invalidate)
{
auto contents = filecontents.find(file);
- if (invalidate)
+ if (contents != filecontents.end())
+ {
+ if (!invalidate)
+ return ReadResult(contents->second, {});
filecontents.erase(contents);
- else if (contents != filecontents.end())
- return ReadResult(contents->second, {});
+ }
bool executable = false;
std::string name = file;
@@ -110,7 +112,7 @@ ServerConfig::ReadResult ServerConfig::ReadFile(const std::string& file, bool in
if (source != filesources.end())
{
name = source->first;
- path = source->second.second;
+ path = source->second.first;
executable = source->second.second;
}