requested to merge piotrkarbowski/xdg-utils:xdg-open-handle-.desktop-Exec-non-zero-exit-code into master
Currently if the tool that was taken out of .desktop file Exec field will exit with non-zero exit code, xdg-open will then fallback to open_generic() from search_desktop_file(), which will lead to opening again the same file with the same tool and ending on opening the file with web browser.
This may lead to situation when for example text editor that fails to write file on exit, will open the unchanged file with web browsr.
Another real life example is if one were to exit from mpv with control-C, xdg-open will again start mpv, then it will try to start x-web-browser and ending with starting a browser from list -- firefox in my case.
This must be a bug as it's not docummented anywhere. If we got to the point where we exec $command_exec then xdg-open must exit even if whatever was executed by $command_exec returned non-zero exit status.