Document portal paths not accessible after reboot even when permissions persist #1925
Unanswered
haydntrowell
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm developing a GTK4/Rust text editor distributed as a Flatpak. I've had a long-standing issue where my recent files list stops working after a reboot, and wanted to check if this is a known issue and whether there's a solution or workaround I'm missing.
I store recently opened files by saving the URI returned by
gio::File::for_path(...).uri(). For files opened via the file chooser portal, this gives us paths likefile:///run/user/1000/doc/ec355f77/basic-report.typ.Here's what I've confirmed through testing:
flatpak permission-showconfirms that permissions persist across reboots as the document IDs are still theregio::File::for_uri(...).path()returnsSome)path.exists()returnsfalsefor those paths, and attempting to open them gives "No such file or directory"I was pointed to issues #1362 and #1845 as potentially related. Is this a known limitation of the document portal, and is there a recommended way for sandboxed apps to re-open previously accessed files without requiring the user to go through the file chooser again?
Beta Was this translation helpful? Give feedback.
All reactions