From 85a28457cee04bdbf265ab4553da75b599b3dbff Mon Sep 17 00:00:00 2001 From: Jonas Suhr Christensen Date: Tue, 5 Aug 2014 20:36:57 +0200 Subject: Fixing windows. --- plugingui/pluginconfig.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'plugingui') diff --git a/plugingui/pluginconfig.cc b/plugingui/pluginconfig.cc index 7c96147..81bff0e 100644 --- a/plugingui/pluginconfig.cc +++ b/plugingui/pluginconfig.cc @@ -72,9 +72,11 @@ FILE* openFilePtr(std::string mode) { NULL, 0, szPath))); { - DEBUG(config, "WINDOWS APP DATA PATH:%s\n", szPath); - PathAppend(szPath, TEXT(CONFIGDIRNAME)); - HANDLE hFile = CreateFile(szPath, GENERIC_READ | GENERIC_WRITE, 0, NULL); + DEBUG(config, "WINDOWS APP DATA PATH:%s\n", szPath); + PathAppend(szPath, TEXT(CONFIGDIRNAME)); + if(!Directory::exists(configpath)) { + CreateDirectory(szPath, NULL); + } } #else std::string configpath = strdup(getenv("HOME")); -- cgit v1.2.3