wxFileName::Normalize(wxPATH_NORM_ENV_VARS) now works
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -848,6 +848,18 @@ bool wxFileName::Normalize(int flags,
|
||||
const wxString& cwd,
|
||||
wxPathFormat format)
|
||||
{
|
||||
// deal with env vars renaming first as this may seriously change the path
|
||||
if ( flags & wxPATH_NORM_ENV_VARS )
|
||||
{
|
||||
wxString pathOrig = GetFullPath(format);
|
||||
wxString path = wxExpandEnvVars(pathOrig);
|
||||
if ( path != pathOrig )
|
||||
{
|
||||
Assign(path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// the existing path components
|
||||
wxArrayString dirs = GetDirs();
|
||||
|
||||
@@ -940,11 +952,6 @@ bool wxFileName::Normalize(int flags,
|
||||
}
|
||||
}
|
||||
|
||||
if ( flags & wxPATH_NORM_ENV_VARS )
|
||||
{
|
||||
dir = wxExpandEnvVars(dir);
|
||||
}
|
||||
|
||||
if ( (flags & wxPATH_NORM_CASE) && !IsCaseSensitive(format) )
|
||||
{
|
||||
dir.MakeLower();
|
||||
|
Reference in New Issue
Block a user