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