From 41a9007b6d3afe62c41b142adf3de1a5689fbe21 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Wed, 15 Nov 2017 12:24:51 -0500 Subject: [PATCH] Fix assertion in symbol library remap dialog. Do not attempt to normalize environment variables that are not valid paths, paths that do not exist, or paths that the user does not have read access to. Fixes lp:1731655 https://bugs.launchpad.net/kicad/+bug/1731655 --- eeschema/dialogs/dialog_symbol_remap.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eeschema/dialogs/dialog_symbol_remap.cpp b/eeschema/dialogs/dialog_symbol_remap.cpp index 3531ff68f3..b4ca635df8 100644 --- a/eeschema/dialogs/dialog_symbol_remap.cpp +++ b/eeschema/dialogs/dialog_symbol_remap.cpp @@ -136,6 +136,11 @@ void DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable( REPORTER& aReporter ) for( auto& entry : envMap ) { + // Don't bother normalizing paths that don't exist or the user cannot read. + if( !wxFileName::DirExists( entry.second.GetValue() ) + || !wxFileName::IsDirReadable( entry.second.GetValue() ) ) + continue; + envPath.SetPath( entry.second.GetValue() ); if( normalizeAbsolutePaths( envPath, fn, &tmp ) )