mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 00:21:25 +00:00
Fix URI environment variable expansion issue.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18918
This commit is contained in:
parent
9cc964fb37
commit
0f33aebe48
@ -357,14 +357,7 @@ const wxString ResolveUriByEnvVars( const wxString& aUri, PROJECT* aProject )
|
||||
{
|
||||
wxString uri = ExpandTextVars( aUri, aProject );
|
||||
|
||||
// URL-like URI: return as is.
|
||||
wxURL url( uri );
|
||||
|
||||
if( url.GetError() == wxURL_NOERR )
|
||||
return uri;
|
||||
|
||||
// Otherwise, the path points to a local file. Resolve environment variables if any.
|
||||
return ExpandEnvVarSubstitutions( aUri, aProject );
|
||||
return ExpandEnvVarSubstitutions( uri, aProject );
|
||||
}
|
||||
|
||||
|
||||
|
@ -104,8 +104,7 @@ KICOMMON_API wxString GetTextVars( const wxString& aSource );
|
||||
KICOMMON_API bool IsTextVar( const wxString& aSource );
|
||||
|
||||
/**
|
||||
* Replace any environment and/or text variables in file-path uris (leaving network-path URIs
|
||||
* alone).
|
||||
* Replace any environment and/or text variables in URIs
|
||||
*/
|
||||
KICOMMON_API const wxString ResolveUriByEnvVars( const wxString& aUri, PROJECT* aProject );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user