mirror of
https://github.com/alexkay/spek.git
synced 2025-06-09 11:52:13 +03:00
Make config dir if it doesn't exist
This commit is contained in:
parent
873b451cd3
commit
1ff2597fdb
@ -40,12 +40,13 @@ void SpekPlatform::init()
|
|||||||
wxString SpekPlatform::config_path(const wxString& app_name)
|
wxString SpekPlatform::config_path(const wxString& app_name)
|
||||||
{
|
{
|
||||||
#ifdef OS_WIN
|
#ifdef OS_WIN
|
||||||
wxFileName file_name(wxStandardPaths::Get().GetUserConfigDir());
|
wxFileName file_name(wxStandardPaths::Get().GetUserConfigDir(), wxEmptyString);
|
||||||
#else
|
#else
|
||||||
wxFileName file_name(wxGetHomeDir(), wxEmptyString);
|
wxFileName file_name(wxGetHomeDir(), wxEmptyString);
|
||||||
file_name.AppendDir(wxT(".config"));
|
file_name.AppendDir(wxT(".config"));
|
||||||
#endif
|
#endif
|
||||||
file_name.AppendDir(app_name);
|
file_name.AppendDir(app_name);
|
||||||
|
file_name.Mkdir(0755, wxPATH_MKDIR_FULL);
|
||||||
file_name.SetFullName(wxT("preferences"));
|
file_name.SetFullName(wxT("preferences"));
|
||||||
return file_name.GetFullPath();
|
return file_name.GetFullPath();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user