diff --git a/common/filename_resolver.cpp b/common/filename_resolver.cpp index 7e4a2238ab..0aa3d0c80c 100644 --- a/common/filename_resolver.cpp +++ b/common/filename_resolver.cpp @@ -601,7 +601,7 @@ bool FILENAME_RESOLVER::readPathList() bool FILENAME_RESOLVER::WritePathList( const wxString& aDir, const wxString& aFilename, - bool aWriteFullList ) + bool aResolvePaths ) { if( aDir.empty() ) { @@ -617,9 +617,10 @@ bool FILENAME_RESOLVER::WritePathList( const wxString& aDir, const wxString& aFi std::list::const_iterator sPL = m_paths.begin(); - // skip all ${ENV_VAR} alias names - if( !aWriteFullList ) + if( !aResolvePaths ) { + // skip all ${ENV_VAR} alias names + while( sPL != m_paths.end() && ( sPL->m_Alias.StartsWith( "${" ) || sPL->m_Alias.StartsWith( "$(" ) ) ) { @@ -652,10 +653,17 @@ bool FILENAME_RESOLVER::WritePathList( const wxString& aDir, const wxString& aFi { tstr = sPL->m_Alias.ToUTF8(); cfgFile << "\"" << tstr.size() << ":" << tstr << "\","; - tstr = sPL->m_Pathvar.ToUTF8(); + + if( aResolvePaths ) + tstr = ResolvePath( sPL->m_Pathvar ).ToUTF8(); + else + tstr = sPL->m_Pathvar.ToUTF8(); + cfgFile << "\"" << tstr.size() << ":" << tstr << "\","; + tstr = sPL->m_Description.ToUTF8(); cfgFile << "\"" << tstr.size() << ":" << tstr << "\"\n"; + ++sPL; } diff --git a/include/filename_resolver.h b/include/filename_resolver.h index ee5299631d..9fc4b26222 100644 --- a/include/filename_resolver.h +++ b/include/filename_resolver.h @@ -91,9 +91,9 @@ public: /** * Write the current path list to a config file. - * @param aWriteFullList indicates whether env vars should also be written out or not + * @param aResolvePaths indicates whether env vars should also be written out or not */ - bool WritePathList( const wxString& aDir, const wxString& aFilename, bool aWriteFullList ); + bool WritePathList( const wxString& aDir, const wxString& aFilename, bool aResolvePaths ); /** * Determines the full path of the given file name.