Added wxCONFIG_USE_RELATIVE_PATH option to allow relative paths for config files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
944ac90330
commit
e716ca3d3b
@ -226,6 +226,8 @@ wxFileConfig::wxFileConfig(const wxString& appName, const wxString& vendorName,
|
||||
SetStyle(GetStyle() | wxCONFIG_USE_GLOBAL_FILE);
|
||||
|
||||
// if the path is not absolute, prepend the standard directory to it
|
||||
// UNLESS wxCONFIG_USE_RELATIVE_PATH style is set
|
||||
if ( !(style & wxCONFIG_USE_RELATIVE_PATH) ){
|
||||
if ( !m_strLocalFile.IsEmpty() && !wxIsAbsolutePath(m_strLocalFile) )
|
||||
{
|
||||
wxString strLocal = m_strLocalFile;
|
||||
@ -239,6 +241,7 @@ wxFileConfig::wxFileConfig(const wxString& appName, const wxString& vendorName,
|
||||
m_strGlobalFile = GetGlobalDir();
|
||||
m_strGlobalFile << strGlobal;
|
||||
}
|
||||
}
|
||||
|
||||
Init();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user