X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/baeed2892d4f876add61aa04fe34364a7df31f7f..c1066cdf62de692cec3b61f68da35263aa17b1c0:/src/common/fileconf.cpp diff --git a/src/common/fileconf.cpp b/src/common/fileconf.cpp index e2ba1c0aaf..7cc86f423d 100644 --- a/src/common/fileconf.cpp +++ b/src/common/fileconf.cpp @@ -220,18 +220,18 @@ wxFileConfig::wxFileConfig(const wxString& strLocal, const wxString& strGlobal) : m_strLocalFile(strLocal), m_strGlobalFile(strGlobal) { // if the path is not absolute, prepend the standard directory to it - - if ( !strLocal.IsEmpty() && !wxIsPathSeparator(strLocal[0u]) ) + if ( !strLocal.IsEmpty() && !wxIsAbsolutePath(strLocal) ) { m_strLocalFile = GetLocalDir(); m_strLocalFile << strLocal; } - if ( !strGlobal.IsEmpty() && !wxIsPathSeparator(strGlobal[0u]) ) + if ( !strGlobal.IsEmpty() && !wxIsAbsolutePath(strGlobal) ) { m_strGlobalFile = GetGlobalDir(); m_strGlobalFile << strGlobal; } + Init(); } @@ -532,8 +532,8 @@ bool wxFileConfig::Read(wxString *pstr, ConfigEntry *pEntry = m_pCurrentGroup->FindEntry(path.Name()); if (pEntry == NULL) { - if(IsRecordingDefaults()) - Write(szKey,szDefault); + if( IsRecordingDefaults() ) + ((wxFileConfig *)this)->Write(szKey,szDefault); *pstr = ExpandEnvVars(szDefault); return FALSE; }