ResolveFile() handles absolute paths

Fixes: lp:1753094
* https://bugs.launchpad.net/kicad/+bug/1753094
This commit is contained in:
Maciej Suminski 2018-03-08 11:34:57 +01:00
parent 9ce768c29a
commit 0bdae22af7
1 changed files with 5 additions and 0 deletions

View File

@ -129,6 +129,11 @@ static wxString createFilePath( const wxString& aPath, const wxString& aFileName
wxString ResolveFile( const wxString& aFileName, const ENV_VAR_MAP* aEnvVars,
const PROJECT* aProject )
{
wxFileName full( aFileName );
if( full.IsAbsolute() )
return full.GetFullPath();
if( aProject )
{
wxFileName fn( createFilePath( aProject->GetProjectPath(), aFileName ) );