mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-12 18:16:30 +02:00
Looks like paths with spaces need to be esaped everywhere with QProcess...
This commit is contained in:
@ -423,10 +423,11 @@ ScriptResolver::startProcess()
|
|||||||
m_error = Tomahawk::ExternalResolver::NoError;
|
m_error = Tomahawk::ExternalResolver::NoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
QFileInfo fi( filePath() );
|
const QFileInfo fi( filePath() );
|
||||||
|
|
||||||
QString interpreter;
|
QString interpreter;
|
||||||
QString runPath = filePath();
|
// have to enclose in quotes if path contains spaces...
|
||||||
|
const QString runPath = QString( "\"%1\"" ).arg( filePath() );
|
||||||
|
|
||||||
QFile file( filePath() );
|
QFile file( filePath() );
|
||||||
file.setPermissions( file.permissions() | QFile::ExeOwner | QFile::ExeGroup | QFile::ExeOther );
|
file.setPermissions( file.permissions() | QFile::ExeOwner | QFile::ExeGroup | QFile::ExeOther );
|
||||||
@ -453,11 +454,6 @@ ScriptResolver::startProcess()
|
|||||||
interpreter = QString( "\"%1\"" ).arg(QString::fromUtf16((const ushort *) path));
|
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
|
#endif // Q_OS_WIN
|
||||||
|
|
||||||
if ( interpreter.isEmpty() )
|
if ( interpreter.isEmpty() )
|
||||||
|
Reference in New Issue
Block a user