Bug 454325

Summary: Please allow choosing whole directory
Product: [Plasma] xdg-desktop-portal-kde Reporter: yvan
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: wishlist CC: aleixpol, jgrulich, nate, sitter
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Flatpak   
OS: Linux   
Latest Commit: Version Fixed In:

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