Skip to content

[Flatpak] In some cases, files are stored as .xdp-myfile.gaphor-<random string>  #3085

@ebousse

Description

@ebousse

Describe the bug

When running Gaphor using Flatpak, creating a new file called myfile.gaphor with Gaphor may yield a file named .xdp-myfile.gaphor-<random string> on the filesystem.

Strangely, in my case, this only happens when I create a new project and save it, and this does not happen when I do Save as.

A workaround is to use a tool such as Flatseal and to give Gaphor new filesystem permissions, such as access to the home folder.

To Reproduce

Steps to reproduce the behavior:

  1. Start Gaphor with Flatpak.
  2. Create a new empty project.
  3. Save it with Ctrl+S as myfile.gaphor

The file ends up saved as .xdp-myfile.gaphor-<random string> on the filesystem.

Expected behavior

The file should keep its original name.

OS

Linux (Fedora 39 GNOME)

Version

Version of Gaphor: 2.23.2
Version of Flatpak: 1.15.6

Additional information

This seems to be a consequence of the documents portal API of Flatpak, which (I think?) makes it possible for Flatpak app to access the filesystem quite safely without any permissions.

But I do not understand why this is erratic (at least in my case), nor how the whole thing works.

Maybe Gaphor should consider asking for actual permission to use the filesystem, instead of using thie API? But this would reduce sandboxing, which would be a shame…

Metadata

Metadata

Assignees

Labels

bugAn issue in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions