summaryrefslogtreecommitdiff
path: root/src/configuration.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-03-28 08:15:31 -0700
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-04-06 21:21:54 +0200
commit76bdc9681799a7ed17be1cddbe7b91adef242373 (patch)
tree53a7cd1d14a5233938704015404d9ea1f5e4490d /src/configuration.cpp
parent59919635523d41f3a15120c83db4b7d080c155de (diff)
downloadmana-76bdc9681799a7ed17be1cddbe7b91adef242373.tar.gz
mana-76bdc9681799a7ed17be1cddbe7b91adef242373.tar.bz2
mana-76bdc9681799a7ed17be1cddbe7b91adef242373.tar.xz
mana-76bdc9681799a7ed17be1cddbe7b91adef242373.zip
Removed seemingly pointless config file checksremoved-config-file-checks
* When config file can't be read, it will be reported by Configuration::init. * When config file can't be written, xmlNewTextWriterFilename will probably return nullptr.
Diffstat (limited to 'src/configuration.cpp')
-rw-r--r--src/configuration.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/configuration.cpp b/src/configuration.cpp
index 7d2b496f..3c9fab3c 100644
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -301,20 +301,7 @@ void ConfigurationObject::writeToXML(xmlTextWriterPtr writer)
void Configuration::write()
{
- // Do not attempt to write to file that cannot be opened for writing
- FILE *testFile = fopen(mConfigPath.c_str(), "w");
- if (!testFile)
- {
- logger->log("Configuration::write() couldn't open %s for writing",
- mConfigPath.c_str());
- return;
- }
-
- fclose(testFile);
-
-
xmlTextWriterPtr writer = xmlNewTextWriterFilename(mConfigPath.c_str(), 0);
-
if (!writer)
{
logger->log("Configuration::write() error while creating writer");