Don't protect arbitrary paths

We only need to protect our predefined variables, not ones that the user
might create that uses the same pattern
This commit is contained in:
Seth Hillbrand 2025-07-23 17:20:39 -07:00
parent 094870e7a4
commit d195e93ebe

View File

@ -46,14 +46,8 @@ static const std::vector<wxString> predefinedEnvVars = {
};
const wxRegEx versionedEnvVarRegex( wxS( "KICAD[0-9]+_[A-Z0-9_]+(_DIR)?" ) );
bool ENV_VAR::IsEnvVarImmutable( const wxString& aEnvVar )
{
if( versionedEnvVarRegex.Matches( aEnvVar ) )
return true;
for( const wxString& s : predefinedEnvVars )
{
if( s == aEnvVar )