From 1ff2597fdbe183cc32aeeed2718e0598c9fe3d55 Mon Sep 17 00:00:00 2001 From: Alexander Kojevnikov Date: Wed, 22 Aug 2012 09:40:50 -0700 Subject: [PATCH] Make config dir if it doesn't exist --- src/spek-platform.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/spek-platform.cc b/src/spek-platform.cc index 8b26be5..8595361 100644 --- a/src/spek-platform.cc +++ b/src/spek-platform.cc @@ -40,12 +40,13 @@ void SpekPlatform::init() wxString SpekPlatform::config_path(const wxString& app_name) { #ifdef OS_WIN - wxFileName file_name(wxStandardPaths::Get().GetUserConfigDir()); + wxFileName file_name(wxStandardPaths::Get().GetUserConfigDir(), wxEmptyString); #else wxFileName file_name(wxGetHomeDir(), wxEmptyString); file_name.AppendDir(wxT(".config")); #endif file_name.AppendDir(app_name); + file_name.Mkdir(0755, wxPATH_MKDIR_FULL); file_name.SetFullName(wxT("preferences")); return file_name.GetFullPath(); }