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

(cherry picked from commit f4b97eca63)
This commit is contained in:
Wayne Stambaugh 2021-11-13 07:51:24 -05:00
parent 0a0a2da680
commit 401b2fb524
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-2014 KiCad Developers, see CHANGELOG.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
@ -70,17 +70,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 );
}
/**
* Function AddPaths
* insert or append path(s)