summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2020-04-10 23:30:06 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2020-04-10 23:30:06 +0200
commitb91ffbf1e3f971bb46df26e965823d98e25ab6aa (patch)
treea9e19e772b0c01830162d83994c25601fb0c12c6 /src
parent33f1c0443680bc77ab3edfde19fd70dc6661f650 (diff)
Fix bug of wrongly set filename in configfile.cc
Diffstat (limited to 'src')
-rw-r--r--src/configfile.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/configfile.cc b/src/configfile.cc
index 436d090..18934aa 100644
--- a/src/configfile.cc
+++ b/src/configfile.cc
@@ -188,12 +188,10 @@ bool ConfigFile::open(std::ios_base::openmode mode)
current_file.close();
}
- std::string filename = getConfigPath();
- filename += sep;
- filename += filename;
+ std::string const full_filename = getConfigPath() + sep + filename;
- DEBUG(configfile, "Opening config file '%s'\n", filename.c_str());
- current_file.open(filename, mode);
+ DEBUG(configfile, "Opening config file '%s'\n", full_filename.c_str());
+ current_file.open(full_filename, mode);
return current_file.is_open();
}