From 401b2fb524f38ec8763cda2985b9a04eeb1af26f Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Sat, 13 Nov 2021 07:51:24 -0500 Subject: [PATCH] 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 f4b97eca6393b83425c0cb296bbaa9961bb18dc0) --- include/search_stack.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/include/search_stack.h b/include/search_stack.h index 33067757af..79d99b84a6 100644 --- a/include/search_stack.h +++ b/include/search_stack.h @@ -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 * * 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)