summaryrefslogtreecommitdiff
path: root/src/configmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/configmanager.cpp')
-rw-r--r--src/configmanager.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/configmanager.cpp b/src/configmanager.cpp
index f95d98f4e..8f0ec3002 100644
--- a/src/configmanager.cpp
+++ b/src/configmanager.cpp
@@ -142,8 +142,14 @@ void ConfigManager::initConfiguration()
FILE *configFile = fopen(configPath.c_str(), "r");
if (!configFile)
{
- configFile = fopen(configPath.c_str(), "wt");
+ configFile = fopen(configPath.c_str(), "wb");
logger->log1("Creating new config");
+ if (configFile)
+ {
+ fputs("<?xml version=\"1.0\"?>\n", configFile);
+ fputs("<configuration>\n", configFile);
+ fputs("</configuration>\n", configFile);
+ }
}
if (!configFile)
{