forked from mia/Aegisub
assdraw: create the config dir if it doesn't already exist
Originally committed to SVN as r6869.
This commit is contained in:
parent
03259b3ceb
commit
4b662d74f4
1 changed files with 5 additions and 2 deletions
|
@ -141,10 +141,13 @@ ASSDrawFrame::ASSDrawFrame( wxApp *app, const wxString& title, const wxPoint& po
|
||||||
InitializeDefaultSettings();
|
InitializeDefaultSettings();
|
||||||
|
|
||||||
// load config
|
// load config
|
||||||
configfile = wxFileName(wxStandardPaths::Get().GetUserConfigDir(), _T("ASSDraw3.cfg")).GetFullPath();
|
configfile = wxFileName(wxStandardPaths::Get().GetUserDataDir(), _T("ASSDraw3.cfg")).GetFullPath();
|
||||||
|
|
||||||
bool firsttime = !::wxFileExists(configfile);
|
bool firsttime = !::wxFileExists(configfile);
|
||||||
if (firsttime) wxFileOutputStream(configfile).Close();
|
if (firsttime) {
|
||||||
|
wxFileName::Mkdir(wxStandardPaths::Get().GetUserDataDir(), wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL);
|
||||||
|
wxFileOutputStream(configfile).Close();
|
||||||
|
}
|
||||||
wxFileInputStream cfgf(configfile);
|
wxFileInputStream cfgf(configfile);
|
||||||
config = new wxFileConfig(cfgf);
|
config = new wxFileConfig(cfgf);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue