https://bugs.kde.org/show_bug.cgi?id=452968

Harald Sitter <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://invent.kde.org/plas
                   |                            |ma/xdg-desktop-portal-kde/c
                   |                            |ommit/390731d731b610e23650c
                   |                            |300ac07453ae33fb521
         Resolution|---                         |FIXED
             Status|CONFIRMED                   |RESOLVED

--- Comment #2 from Harald Sitter <[email protected]> ---
Git commit 390731d731b610e23650c300ac07453ae33fb521 by Harald Sitter.
Committed on 25/04/2022 at 19:12.
Pushed by ngraham into branch 'master'.

reverse url fusing

this actually was defective even with local urls...
as we pass files through the portal the sandbox gets irrelevant portal
paths a la /run/foo/bar/yolo.txt when the sandbox then gives us that
path back, the directory isn't meant to be written to, much less shown
to the user to begin with.

to deal with this scenario we now do a reverse resolution dance on
savefile. notably we first ask the portal to translate the portal file
name in /run to the actual file name underneath it. we then run that
path through kio-fuse in case it was fuse mounted

this renders /run to /home/foo/yolo.txt or when it was fuse mounted for
example smb:///foo/yolo.txt

the effective end result is that when you open a file in okular from a
samba share and then save-as, the file save dialog will show the smb://
url not the fake /run url

A  +18   -0    data/org.freedesktop.portal.Documents.xml
M  +3    -0    src/CMakeLists.txt
M  +66   -3    src/filechooser.cpp

https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/390731d731b610e23650c300ac07453ae33fb521

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to