diff options
-rw-r--r-- | plugingui/pluginconfig.cc | 8 |
1 files changed, 5 insertions, 3 deletions
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")); |