Skip to content

fix(mount-point): resolve pick_directory's Document Portal path to th… - #26

Merged
t0msk merged 1 commit into
masterfrom
fix/pick-directory-document-portal-host-path
Oct 31, 2026
Merged

t0msk merged 1 commit into
masterfrom
fix/pick-directory-document-portal-host-path

Conversation

@t0msk

@t0msk t0msk commented Oct 31, 2026

Copy link
Copy Markdown
Owner

…e real host path

Under Flatpak, org.freedesktop.portal.FileChooser always routes a sandboxed caller's result through the Document Portal in the portal daemon itself - identically for ashpd's raw call and a GTK dialog's own wrapper - so pick_directory kept returning the ephemeral /run/user/$UID/doc//... path instead of the real host one, exactly the bug it was meant to fix.

Resolve the rest of the way with a second portal call, org.freedesktop.portal.Documents.GetHostPaths, which maps that back to the real host path (falls back to the FUSE path if the call fails, rather than failing the whole pick over it).

…e real host path

Under Flatpak, org.freedesktop.portal.FileChooser always routes a sandboxed
caller's result through the Document Portal in the portal daemon itself -
identically for ashpd's raw call and a GTK dialog's own wrapper - so
pick_directory kept returning the ephemeral /run/user/$UID/doc/<id>/...
path instead of the real host one, exactly the bug it was meant to fix.

Resolve the rest of the way with a second portal call,
org.freedesktop.portal.Documents.GetHostPaths, which maps that <id> back to
the real host path (falls back to the FUSE path if the call fails, rather
than failing the whole pick over it).
@t0msk
t0msk merged commit ffc7f8b into master Oct 31, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant