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:
parent
0a0a2da680
commit
401b2fb524
|
@ -2,7 +2,7 @@
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2014 CERN
|
* 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>
|
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
|
@ -70,17 +70,6 @@ public:
|
||||||
wxString FilenameWithRelativePathInSearchList(
|
wxString FilenameWithRelativePathInSearchList(
|
||||||
const wxString& aFullFilename, const wxString& aBaseDir );
|
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
|
* Function AddPaths
|
||||||
* insert or append path(s)
|
* insert or append path(s)
|
||||||
|
|
Loading…
Reference in New Issue