Skip to content

openurljob.cpp: Avoid opening files in endless loop if mimetype is set to open with xdg-open

Akseli Lahtinen requested to merge work/akselmo/avoid-xdg-open-loop into master

Some applications set their file mimetypes to open with "xdg-open" which then causes it open in "kde-open", which then ends up calling itself constantly and endlessly, spiking CPU.

Instead, catch that early on and show the "Open with dialog", so we handle the file like it has no set default application.

BUG:494335


How to test:

  1. Create empty file
  2. Set that file to always open with xdg-open or kde-open
  3. Try opening the file with xdg-open or kde-open inside terminal
  4. Try opening the file from Dolphin by clicking on it
  5. It should always ask for the application to open with now
Edited by Akseli Lahtinen

Merge request reports