Skip to content

Commit

Permalink
[libcontentaction] Remove the MIME type handler for .desktop files. F…
Browse files Browse the repository at this point in the history
…ixes JB#43064

This prevents .desktop files being used as scripts which don't require
execute permissions.
  • Loading branch information
adenexter committed Feb 7, 2019
1 parent 4b34183 commit 5e3d702
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/mime.cpp
Expand Up @@ -407,10 +407,6 @@ Action Action::defaultActionForFile(const QUrl& fileUri, const QString& mimeType
if (mimeType.isEmpty())
return Action();

// We treat .desktop files specially: the default action (the only
// actually) is to launch the application it describes.
if (mimeType == DesktopFileMimeType)
return createAction(fileUri.toLocalFile(), QStringList());
QString app = findDesktopFile(defaultAppForContentType(mimeType));
if (!app.isEmpty()) {
return createAction(app, QStringList() << fileUri.toEncoded());
Expand Down

0 comments on commit 5e3d702

Please sign in to comment.