7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 20:23:44 +00:00

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

Fixes https://gitlab.com/kicad/code/kicad/issues/14564
This commit is contained in:
Jeff Young 2023-04-29 17:51:36 +01:00
parent a817b4c1ff
commit 08c773a0bf

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" ) )