mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-08 15:16:34 +02:00
Try using non-escaped path for QFile::exists()
This commit is contained in:
@@ -42,12 +42,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 ) ) );
|
||||||
|
|
||||||
|
QString pathToCheck = filePath();
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
// have to enclose in quotes if path contains spaces on windows...
|
// have to enclose in quotes if path contains spaces on windows...
|
||||||
setFilePath( QString( "\"%1\"" ).arg( filePath() ) );
|
setFilePath( QString( "\"%1\"" ).arg( filePath() ) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if( !QFile::exists( filePath() ) )
|
if( !QFile::exists( pathToCheck ) )
|
||||||
m_error = Tomahawk::ExternalResolver::FileNotFound;
|
m_error = Tomahawk::ExternalResolver::FileNotFound;
|
||||||
else
|
else
|
||||||
m_proc.start( filePath() );
|
m_proc.start( filePath() );
|
||||||
|
Reference in New Issue
Block a user