Fix broken search stack behavior.

The overload of wxFilePath::FindValidPath() broke the normal behavior
when the file searched for existed in the current working directory.
This was causing the initial library table file to be copied from the
current working directory instead of from the list of search paths.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9599
This commit is contained in:
Wayne Stambaugh 2021-11-13 07:51:24 -05:00
parent e218471d24
commit f4b97eca63
1 changed files with 1 additions and 12 deletions

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014 CERN
* Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
* @author Maciej Suminski <maciej.suminski@cern.ch>
*
* This program is free software; you can redistribute it and/or
@ -67,17 +67,6 @@ public:
wxString FilenameWithRelativePathInSearchList( const wxString& aFullFilename,
const wxString& aBaseDir );
wxString FindValidPath( const wxString& aFileName ) const
{
#if 1 // might not be needed
if( wxFileName::FileExists( aFileName ) )
return aFileName;
else
#endif
return wxPathList::FindValidPath( aFileName );
}
/**
* Insert or append path(s).
*