Use wxFileName to resolve . and .. in documentation paths.
Fixes https://gitlab.com/kicad/code/kicad/issues/14564
This commit is contained in:
parent
a817b4c1ff
commit
08c773a0bf
|
@ -144,6 +144,9 @@ bool GetAssociatedDocument( wxWindow* aParent, const wxString& aDocName, PROJECT
|
||||||
|
|
||||||
wxFileName currentFileName( fullfilename );
|
wxFileName currentFileName( fullfilename );
|
||||||
|
|
||||||
|
// Use wxWidgets to resolve any "." and ".." in the path
|
||||||
|
fullfilename = currentFileName.GetAbsolutePath();
|
||||||
|
|
||||||
wxString file_ext = currentFileName.GetExt();
|
wxString file_ext = currentFileName.GetExt();
|
||||||
|
|
||||||
if( file_ext.Lower() == wxT( "pdf" ) )
|
if( file_ext.Lower() == wxT( "pdf" ) )
|
||||||
|
|
Loading…
Reference in New Issue