BUG: 418155
Diff Detail
- Repository
- R838 Flatpak Support: KDE Portal for XDG Desktop
- Branch
- Plasma/5.18
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 22891 Build 22909: arc lint + arc unit
Shouldn't KIO take care of this stuff automatically? I wouldn't want to lose streaming support for Flatpak apps.
It should, but there's no API for that yet.
At some point the file dialog can just return a FUSE path if the selected file is a remote URL and only local paths are accepted.
src/filechooser.cpp | ||
---|---|---|
210 | What about local URLs such as file:///? Should probably try to use KIO::mostLocalUrl or something like that before. |
This really isn't ideal. It means we can't deal with any biggish files without having to cache them first.
Also saving back (e.g. in kate) won't work, right?
Maybe we can come up with a solution with fuse?
With a brief look the ideal scenario is to be able to use DesktopExecParser::resultingArguments, or a class that calls it KRun. That should do the conversion. I'm just not sure if you have the information required to use it.
See D23384
I have never used fuse. I see you can use kio-fuse over dbus to mount a file, but you still have to unmount it, which will be a problem, because from the portal I don't know whether the app is still using it or not.
If anyone is familiar with fuse and have solution in mind, can you give me a hint?
kio-fuse was designed with this in mind and does not even support unmounting. When the file isn't being used anymore, it drops everything except what's needed to reopen the file when requested.
If anyone is familiar with fuse and have solution in mind, can you give me a hint?
In this case it would be as easy as just calling org.kde.KIOFuse org.kde.KIOFuse.VFS mountUrl with the url and it gets a local path back.
This should ideally be handled transparently by the KDE file dialog though.
I will make the portal not to freeze the app when there is no local file selected and we can revisit this later. As I can see, there is not even a stable relase of kio-fuse, it also requires the user to start it manually and pick a folder so the experience is not that seamless and as Fabian said, it would be better to have this handled transparently by the file dialog.
Correct.
it also requires the user to start it manually and pick a folder so the experience is not that seamless and as Fabian said, it would be better to have this handled transparently by the file dialog.
It's an autolaunching DBus service. Just make the call and it's up and running.