Fixed the "Could not set current working directory" log that would appear on boot when there was no xrc sub-directory present.
This commit is contained in:
parent
9c35a933d9
commit
f7e352d5a4
|
@ -97,8 +97,8 @@ bool wxvbamApp::OnInit()
|
|||
xr->Load(wxT("*.xrs"));
|
||||
}
|
||||
|
||||
if (wxSetWorkingDirectory(wxStandardPaths::Get().GetPluginsDir() + wxT("\\xrc"))) {
|
||||
if (!wxFindFirstFile(wxT("*.xrc")).empty())
|
||||
wxString xrcDir = wxStandardPaths::Get().GetPluginsDir() + wxT("\\xrc");
|
||||
if (wxDirExists(xrcDir) && wxSetWorkingDirectory(xrcDir) && !wxFindFirstFile(wxT("*.xrc")).empty()) {
|
||||
xr->Load(wxT("*.xrc"));
|
||||
}
|
||||
else {
|
||||
|
@ -106,7 +106,6 @@ bool wxvbamApp::OnInit()
|
|||
xr->Load(wxT("memory:wxvbam.xrs"));
|
||||
}
|
||||
|
||||
|
||||
wxSetWorkingDirectory(cwd);
|
||||
|
||||
// set up config file
|
||||
|
|
Loading…
Reference in New Issue