Use wxFileName to resolve . and .. in documentation paths.

Fixes https://gitlab.com/kicad/code/kicad/issues/14564

(cherry picked from commit 08c773a0bf)
This commit is contained in:
Jeff Young 2023-04-29 17:51:36 +01:00
parent c18600b67f
commit f08029354a
1 changed files with 3 additions and 0 deletions

View File

@ -144,6 +144,9 @@ bool GetAssociatedDocument( wxWindow* aParent, const wxString& aDocName, PROJECT
wxFileName currentFileName( fullfilename );
// Use wxWidgets to resolve any "." and ".." in the path
fullfilename = currentFileName.GetAbsolutePath();
wxString file_ext = currentFileName.GetExt();
if( file_ext.Lower() == wxT( "pdf" ) )