Bug#1028352: xdg-mime: ignores MimeType without trailing semicolon

Jakub Wilk jwilk at jwilk.net
Mon Jan 9 21:09:17 GMT 2023


Package: xdg-utils
Version: 1.1.3-4.1

xdg-mime doesn't seem to be able to correctly parse *.desktop files with 
MimeType lines that don't end with a semicolon:

    $ ls /usr/share/applications/mimeinfo.cache
    ls: cannot access '/usr/share/applications/mimeinfo.cache': No such file or directory

    $ grep Mime /usr/share/applications/xdot.desktop
    MimeType=text/vnd.graphviz

    $ xdg-mime query default text/vnd.graphviz
    [nothing]

    $ sudo sed -i -Ee 's/^(MimeType=.*)/\1;/' /usr/share/applications/xdot.desktop

    $ xdg-mime query default text/vnd.graphviz
    xdot.desktop

-- 
Jakub Wilk



More information about the Pkg-freedesktop-maintainers mailing list