Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open File dialog often shows "Directory not found" errors on Flatpak #4492

Open
PhrozenByte opened this issue Jan 25, 2025 · 0 comments
Open
Labels

Comments

@PhrozenByte
Copy link

Describe the bug
When opening a file with Portfolio Performance (e.g. to import some PDF), the application attempts to restore the last used directory. However, if Portfolio Performance was installed as a Flatpak, the application doesn't have native access to the filesystem, but uses the Flatpak document portal to access files. This means that the open dialog doesn't actually pass a real file path (e.g. /home/user/My bank statement.pdf) to Portfolio Performance when opening a file, but mounts the file below a randomly created runtime directory within the Flatpak container (e.g. /run/flatpak/doc/deadbeef/My bank statement.pdf) and passes that path instead. This runtime directory is later deleted automatically when the file is no longer in use. If one then attempts to open another file, Portfolio Performance instructs the open dialogue to start in the last used directory (e.g. /run/flatpak/doc/deadbeef/), but since this directory no longer exists, a "Directory not found" error is shown. See screenshot below. If the file is still in use (i.e. there's an active file descriptor for that file), the runtime directory will still exist and the open dialog will handle everything gracefully, i.e. this won't happen when e.g. opening a portfolio unless the previously used portfolio was closed.

To Reproduce
Steps to reproduce the behavior:

  1. Import some PDF with Portfolio Performance when installed as Flatpak
  2. Import another PDF with Portfolio Performance

Expected behavior
If installed as Flatpak, Portfolio Performance shouldn't try to start from the last used directory when opening files, but always start from the home directory.

Screenshots
Screenshot

Desktop (please complete the following information):

  • Arch Linux, GNOME Shell 47.3 (on Wayland)
  • Flatpak 1.16.0
  • Portfolio Performance 0.73.0 (from Flathub with Java 21.0.5+2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant