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:
parent
23853cae14
commit
eeeb4596c3
|
@ -351,7 +351,12 @@ bool OpenPDF( const wxString& file )
|
||||||
|
|
||||||
if( !Pgm().UseSystemPdfBrowser() ) // Run the preferred PDF Browser
|
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( "'" );
|
command = Pgm().GetPdfBrowserName() + wxT( " '" ) + filename + wxT( "'" );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue