Fix logic error in FileResolvers.
If Normalize() was not needed after finding a searchpath then we were never updating tname and just blindly returning it. Fixes https://gitlab.com/kicad/code/kicad/issues/7670
This commit is contained in:
parent
23c76cccf3
commit
24f3c49631
|
@ -377,6 +377,8 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
|||
|
||||
if( wxFileName::FileExists( fullPath ) )
|
||||
{
|
||||
tname = fullPath;
|
||||
|
||||
wxFileName tmp( fullPath );
|
||||
|
||||
if( tmp.Normalize() )
|
||||
|
|
|
@ -396,7 +396,9 @@ wxString S3D_RESOLVER::ResolvePath( const wxString& aFileName )
|
|||
|
||||
if( wxFileName::FileExists( fullPath ) )
|
||||
{
|
||||
wxFileName tmp( fullPath );
|
||||
tname = fullPath;
|
||||
|
||||
wxFileName tmp( tname );
|
||||
|
||||
if( tmp.Normalize() )
|
||||
tname = tmp.GetFullPath();
|
||||
|
@ -928,7 +930,6 @@ bool S3D_RESOLVER::ValidateFileName( const wxString& aFileName, bool& hasAlias )
|
|||
|
||||
if( aliasEnd != wxString::npos )
|
||||
lpath = aFileName.substr( aliasEnd + 1 );
|
||||
|
||||
}
|
||||
|
||||
if( wxString::npos != lpath.find_first_of( wxFileName::GetForbiddenChars() ) )
|
||||
|
|
Loading…
Reference in New Issue