mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 10:22:48 +00:00
kinit: check only if the MIME type is executable
to be able to run services for files that have the executable bit set but are not actually programs Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
3dc31e41cb
commit
e19f1d01f5
1 changed files with 2 additions and 2 deletions
|
@ -304,7 +304,7 @@ bool KLauncherAdaptor::start_service_by_storage_id(const QString &serviceName,
|
|||
{
|
||||
KService::Ptr kservice = KService::serviceByStorageId(serviceName);
|
||||
if (!kservice) {
|
||||
kError() << "invalid service path" << serviceName;
|
||||
kError() << "invalid service" << serviceName;
|
||||
showError(i18n("Invalid service: %1", serviceName), window);
|
||||
removeTemp(temp, urls);
|
||||
return false;
|
||||
|
@ -373,7 +373,7 @@ bool KLauncherAdaptor::start_service_by_url(const QString &url, const QStringLis
|
|||
return false;
|
||||
}
|
||||
kDebug() << "MIME type of" << url << "is" << urlmimetype;
|
||||
if (KRun::isExecutableFile(realurl, urlmimetype)) {
|
||||
if (KRun::isExecutable(urlmimetype)) {
|
||||
kDebug() << "execuable file" << url;
|
||||
KMessageBox::sorryWId(
|
||||
static_cast<WId>(window),
|
||||
|
|
Loading…
Add table
Reference in a new issue