Properly escape spaces when opening PDFs on windows

Fixes https://gitlab.com/kicad/code/kicad/issues/2625
This commit is contained in:
Ian McInerney 2020-01-03 19:05:45 +00:00
parent e54c954aed
commit 20e7fc8a0e
1 changed files with 5 additions and 0 deletions

View File

@ -211,7 +211,12 @@ bool OpenPDF( const wxString& file )
if( !Pgm().UseSystemPdfBrowser() ) // Run the preferred PDF Browser
{
#ifdef __WXMSW__
// Windows requires double quotes around the filename to handle spaces
command = Pgm().GetPdfBrowserName() + wxT( " \"" ) + filename + wxT( "\"" );
#else
command = Pgm().GetPdfBrowserName() + wxT( " '" ) + filename + wxT( "'" );
#endif
}
else
{