Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filepicker invoked through xdg-desktop-portal requests directory instead of files #25960

Closed
sylph1o opened this issue Aug 12, 2023 · 1 comment
Labels

Comments

@sylph1o
Copy link

sylph1o commented Aug 12, 2023

Steps to reproduce

Configuration

I use xdg-desktop-portal to define my file chooser for the applications that support it. Note that I do not use Flatpak.

This works with all my other applications: I am able to select and open files or directories when the file chooser is called by the application. This includes my web browsers, and therefore it works with Element web. This issue only happens with Element desktop, which leads me to believe that it comes from it.

Issue with Element desktop

Element desktop seems to support xdg-desktop-portal: trying to send a file brings up the file picker called through xdg-desktop-portal. However, Element desktop requests a directory instead of files.

I have reproduced this on two different computers with almost identical configurations.

Steps to reproduce

  1. Install xdg-desktop-portal along with a backend.
  2. Start its systemd service.
  3. Set the environment variable GTK_USE_PORTAL=1 (possibly unnecessary).
  4. Start Element Desktop.
  5. In any room, click on the 'Attachement' button.

Outcome

Expected

The file chooser called by Element desktop should request one (possibly several) files.

What happened instead

The file chooser requests a directory. I can only select directories and, unsurprisingly, selecting a directory causes the action to fail. I am unable to send attachments with Element Desktop.

My thoughts

According the relevant documentation, it looks like the OpenFile method is called with the boolean option directory set to True.

This is confirmed by looking at the process spawning my file chooser: it passes the flags directory and multiple both set to True. The latter is expected (although not necessary); the former is the issue.

Operating system

Arch Linux

Application version

1.11.38

How did you install the app?

Arch Linux package repository

Homeserver

matrix.org

Will you send logs?

Yes.
P.S. Logs sent.

@t3chguy
Copy link
Member

t3chguy commented Aug 14, 2023

The arch package isn't maintained by us, seek support from its maintainer.

@t3chguy t3chguy closed this as completed Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants