mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
* Make sure script-resolvers are executable before trying to execute them.
This commit is contained in:
@@ -160,6 +160,7 @@ ScriptResolver::running() const
|
|||||||
return !m_stopped;
|
return !m_stopped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ScriptResolver::sendMessage( const QVariantMap& map )
|
ScriptResolver::sendMessage( const QVariantMap& map )
|
||||||
{
|
{
|
||||||
@@ -413,7 +414,8 @@ ScriptResolver::setupConfWidget( const QVariantMap& m )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ScriptResolver::startProcess()
|
void
|
||||||
|
ScriptResolver::startProcess()
|
||||||
{
|
{
|
||||||
if ( !QFile::exists( filePath() ) )
|
if ( !QFile::exists( filePath() ) )
|
||||||
m_error = Tomahawk::ExternalResolver::FileNotFound;
|
m_error = Tomahawk::ExternalResolver::FileNotFound;
|
||||||
@@ -427,6 +429,9 @@ void ScriptResolver::startProcess()
|
|||||||
QString interpreter;
|
QString interpreter;
|
||||||
QString runPath = filePath();
|
QString runPath = filePath();
|
||||||
|
|
||||||
|
QFile file( filePath() );
|
||||||
|
file.setPermissions( file.permissions() | QFile::ExeOwner | QFile::ExeGroup | QFile::ExeOther );
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
if ( fi.suffix().toLower() != "exe" )
|
if ( fi.suffix().toLower() != "exe" )
|
||||||
{
|
{
|
||||||
@@ -456,7 +461,7 @@ void ScriptResolver::startProcess()
|
|||||||
}
|
}
|
||||||
#endif // Q_OS_WIN
|
#endif // Q_OS_WIN
|
||||||
|
|
||||||
if( interpreter.isEmpty() )
|
if ( interpreter.isEmpty() )
|
||||||
{
|
{
|
||||||
#ifndef Q_OS_WIN
|
#ifndef Q_OS_WIN
|
||||||
const QFileInfo info( runPath );
|
const QFileInfo info( runPath );
|
||||||
|
Reference in New Issue
Block a user