Bug 454325 - Please allow choosing whole directory
Summary: Please allow choosing whole directory
Status: RESOLVED FIXED
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Flatpak Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-24 10:42 UTC by yvan
Modified: 2022-06-08 10:26 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yvan 2022-05-24 10:42:52 UTC
Hi,

I would like to distribute an application with Flatpak. This application needs to access whole directory contents. If I try to run my Flatpak application from KDE, it fails with error `[Errno 2] No such file or directory: '/run/user/1000/doc/1501a601/my_directory'`, while I can access this directory from command line/Dolpin.

As stated in https://docs.flatpak.org/en/latest/portals-qt.html, this is currently not supported, while it is in GTK portal (https://docs.flatpak.org/en/latest/portals-gtk.html). I suppose this is the source of my error.

Could you add directory support in KDE portal ?

Regards,
Yvan
Comment 2 yvan 2022-05-24 14:21:56 UTC
(In reply to Harald Sitter from comment #1)
> Isn't this
> https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/76

Hi Harald,

I just did some more tests, and somehow it worked, I can not tell why it was not working before, sorry… For information, my app uses GTK but it is the KDE file chooser which shows when I "open a directory" in my app (I use KDE), so I don't know if it is the KDE or GTK portal which is involved here.

But, I followed the link you gave and if I understand properly this merge request is a bit different from what I was asking: I need to be able to open an entire directory (not a single file), which seems different from being able to save multiple files at once.
Comment 3 Harald Sitter 2022-05-25 09:35:18 UTC
Ah right, yeah, directory opening should definitely work. We use that in filelight successfully. Just to confirm, this is now working for you?
Comment 4 yvan 2022-05-25 13:53:57 UTC
Yes it works now, thanks (I do not master Flatpak packaging yet :-) ). I could not find FileLight on Flathub though, where is the Flatpak version?

I submitted a bug report (https://github.com/flatpak/flatpak-docs/issues/333) asking update to the Flatpak documentation.
Comment 5 Harald Sitter 2022-06-08 10:26:45 UTC
filelight is only in the beta channel AFAIK