diff options
-rw-r--r-- | src/configmanager.cpp | 8 |
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) { |