Properly escape spaces when opening PDFs on windows

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

(cherry-picked from 20e7fc8a0e)
This commit is contained in:
Ian McInerney 2020-01-03 19:05:45 +00:00
parent 23853cae14
commit eeeb4596c3
1 changed files with 5 additions and 0 deletions

View File

@ -351,7 +351,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
{