From 3a9746c65747740344f1eea1a0f8ce9e23d4d615 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 13 May 2020 23:45:04 +0100 Subject: [PATCH] Add ~ processing in env vars. Fixes https://gitlab.com/kicad/code/kicad/issues/1829 --- common/common.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/common.cpp b/common/common.cpp index 7adcd5fc9d..2c2a4fd8a1 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -554,6 +554,11 @@ wxString KIwxExpandEnvVars( const wxString& str, const PROJECT* aProject ) } } +#ifndef __WINDOWS__ + if( strResult.StartsWith( "~" ) ) + strResult.Replace( "~", wxGetHomeDir(), false ); +#endif // __WINDOWS__ + return strResult; }