From 71c3a215093b1a22127ac0936ea0b988436af1c2 Mon Sep 17 00:00:00 2001 From: Jonas Suhr Christensen Date: Tue, 23 Sep 2014 17:26:09 +0200 Subject: Testing config file creation on windows XP. --- plugingui/pluginconfig.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugingui/pluginconfig.cc b/plugingui/pluginconfig.cc index 38cf616..1ce1e66 100644 --- a/plugingui/pluginconfig.cc +++ b/plugingui/pluginconfig.cc @@ -82,7 +82,11 @@ FILE* openFilePtr(std::string mode) { configpath += CONFIGDIRNAME; if(!Directory::exists(configpath)) { DEBUG(pluginconfig, "No configuration exists, creating directory '%s'\n", configpath.c_str()); +#ifdef WIN32 + if( (mkdir(configpath.c_str())) < 0) { +#else if( (mkdir(configpath.c_str(), 0755)) < 0) { +#endif DEBUG(pluginconfig, "Could not create config directory\n"); } return NULL; -- cgit v1.2.3