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

Looks like paths with spaces need to be esaped everywhere with QProcess...

This commit is contained in:
Leo Franchi
2012-06-26 18:21:46 -04:00
committed by Christian Muehlhaeuser
parent 012556ca0a
commit 4a2ef91638

View File

@@ -424,10 +424,11 @@ ScriptResolver::startProcess()
m_error = Tomahawk::ExternalResolver::NoError;
}
QFileInfo fi( filePath() );
const QFileInfo fi( filePath() );
QString interpreter;
QString runPath = filePath();
// have to enclose in quotes if path contains spaces...
const QString runPath = QString( "\"%1\"" ).arg( filePath() );
QFile file( filePath() );
file.setPermissions( file.permissions() | QFile::ExeOwner | QFile::ExeGroup | QFile::ExeOther );
@@ -454,11 +455,6 @@ ScriptResolver::startProcess()
interpreter = QString( "\"%1\"" ).arg(QString::fromUtf16((const ushort *) path));
}
}
else
{
// have to enclose in quotes if path contains spaces on windows...
runPath = QString( "\"%1\"" ).arg( filePath() );
}
#endif // Q_OS_WIN
if ( interpreter.isEmpty() )