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

Try using non-escaped path for QFile::exists()

This commit is contained in:
Leo Franchi
2011-07-25 11:00:55 -04:00
parent df6dc711fc
commit b7432c8b6c

View File

@@ -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() );