macOS: flatten symlinks from paths in GetExecutablePath

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14430
This commit is contained in:
Jon Evans 2023-11-15 09:25:38 -05:00
parent d54e5b180b
commit 0422d2e70f
1 changed files with 2 additions and 0 deletions

View File

@ -27,6 +27,7 @@
#include <config.h>
#include <build_version.h>
#include <macros.h>
#include <wx_filename.h>
// lowercase or pretty case depending on platform
#if defined( __WXMAC__ ) || defined( __WXMSW__ )
@ -532,6 +533,7 @@ const wxString& PATHS::GetExecutablePath()
// bundle directory, e.g., /Applications/kicad.app/
wxFileName fn( bin_dir );
WX_FILENAME::ResolvePossibleSymlinks( fn );
if( fn.GetName() == wxT( "kicad" ) || fn.GetName() == wxT( "kicad-cli" ) )
{