Skip to content

bug(query_default_app): doesn't read desktop files #4

@elde-n

Description

@elde-n

Using

xdg_utils::query_default_app("x-scheme-handler/https").unwrap();

fails with error: Custom { kind: NotFound, error: "No results for mime query: x-scheme-handler/https" }

but using the shell command

xdg-mime query default "x-scheme-handler/https"

gives me: io.gitlab.librewolf-community.desktop

Noticing that I had $XDG_DATA_HOME/flatpak/exports/share in my $XDG_DATA_DIRS environment. I looked inside and found that $XDG_DATA_HOME/flatpak/exports/share/applications had symlinks to .desktop files that contained the MimeType entries.

Reading the desktop file in $XDG_DATA_HOME/flatpak/app/io.gitlab.librewolf-community/current/active/export/share/applications/io.gitlab.librewolf-community.desktop contained

MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;application/x-xpinstall;application/pdf;application/json;

Reading the source code of query_default_app I can see that, no desktop files or symlinks are being read.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions