mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
kiplatform: Add quotes to restart registration command line.
(cherry picked from commit 6e0d940b984aa639e434978e816752efcc05d12c)
This commit is contained in:
parent
152252c685
commit
00ff5baf59
@ -83,15 +83,18 @@ bool KIPLATFORM::APP::IsOperatingSystemUnsupported()
|
||||
|
||||
bool KIPLATFORM::APP::RegisterApplicationRestart( const wxString& aCommandLine )
|
||||
{
|
||||
// Command line arguments with spaces require quotes.
|
||||
wxString restartCmd = wxS( "\"" ) + aCommandLine + wxS( "\"" );
|
||||
|
||||
// Ensure we don't exceed the maximum allowable size
|
||||
if( aCommandLine.length() > RESTART_MAX_CMD_LINE - 1 )
|
||||
if( restartCmd.length() > RESTART_MAX_CMD_LINE - 1 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
hr = ::RegisterApplicationRestart( aCommandLine.wc_str(), RESTART_NO_PATCH );
|
||||
hr = ::RegisterApplicationRestart( restartCmd.wc_str(), RESTART_NO_PATCH );
|
||||
|
||||
return SUCCEEDED( hr );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user