1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-05 13:47:26 +02:00

enclose path in quotes on windows so it works with paths with spaces

This commit is contained in:
Leo Franchi
2011-06-08 21:51:14 -04:00
parent 0b2302a675
commit c014ccdf33

View File

@@ -39,7 +39,13 @@ ScriptResolver::ScriptResolver( const QString& exe )
connect( &m_proc, SIGNAL( readyReadStandardOutput() ), SLOT( readStdout() ) ); connect( &m_proc, SIGNAL( readyReadStandardOutput() ), SLOT( readStdout() ) );
connect( &m_proc, SIGNAL( finished( int, QProcess::ExitStatus ) ), SLOT( cmdExited( int, QProcess::ExitStatus ) ) ); connect( &m_proc, SIGNAL( finished( int, QProcess::ExitStatus ) ), SLOT( cmdExited( int, QProcess::ExitStatus ) ) );
m_proc.start( filePath() ); QString filepath = filePath();
#ifdef WIN32
// have to enclose in quotes if path contains spaces on windows...
filepath = QString( "\"%1\"" ).arg( filepath );
#endif
m_proc.start( filepath );
} }