From 66ebd68060e534ece4c45f0520818c0a94546841 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 29 Mar 2022 18:51:03 +0200 Subject: [PATCH] Cvpcb: fix "not found" .equ files. Fixes #11264 https://gitlab.com/kicad/code/kicad/issues/11264 --- cvpcb/auto_associate.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cvpcb/auto_associate.cpp b/cvpcb/auto_associate.cpp index e677a6fa55..5144fa52c7 100644 --- a/cvpcb/auto_associate.cpp +++ b/cvpcb/auto_associate.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -94,7 +94,10 @@ int CVPCB_MAINFRAME::buildEquivalenceList( FOOTPRINT_EQUIVALENCE_LIST& aList, { fn = wxExpandEnvVars( equfile ); - tmp = search.FindValidPath( fn.GetFullPath() ); + if( fn.IsAbsolute() || fn.FileExists() ) + tmp = fn.GetFullPath(); + else + tmp = search.FindValidPath( fn.GetFullPath() ); if( !tmp ) { @@ -102,8 +105,7 @@ int CVPCB_MAINFRAME::buildEquivalenceList( FOOTPRINT_EQUIVALENCE_LIST& aList, if( aErrorMessages ) { - error_msg.Printf( _( "Equivalence file '%s' could not be found in the " - "default search paths." ), + error_msg.Printf( _( "Equivalence file '%s' could not be found." ), fn.GetFullName() ); if( ! aErrorMessages->IsEmpty() )