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

Use the app config dir to save the QSettings file. #105

Merged
merged 1 commit into from
Jul 4, 2024
Merged

Use the app config dir to save the QSettings file. #105

merged 1 commit into from
Jul 4, 2024

Conversation

dcaliste
Copy link
Collaborator

Close #99.

Sailjail is not mounting the generic config dir, so the QSettings file should be under org/app/ dir and not under the org/ dir. See https://forum.sailfishos.org/t/application-data-dir-sailjail-and-organizationname/6471/14 for more details.

This is a conflict between the fact that QSettings stores its file in a shared directory by default and that isolation impose to hide shared directories and use only private directories.

It's also a bit of an issue because the old conf file is not visible from inside the jail and thus running flowplayer inside the jail cannot migrate the user conf file to its new proper location. Jolla thought about this, but it's only working for harbour compliant applications (which was not the case of flowplayer) where the directory naming convention is using the harbour- prefix. So accepting this PR will result in the QSettings file being recreated and the user starting with a "new" flowplayer. The directories to parse for music will be lost for instance and will have to be reset. There is a possibility to migrate the file manually as a postinst rule in the RPM, dealing with the primary user, but that's error prone and ugly (the packkaging system is not the place to do this).

Sailjail is not mounting the generic config dir,
so the QSettings file should be under org/app/
dir and not under the org/ dir.
Copy link
Contributor

@Olf0 Olf0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, though I would not call my looking at the code changes a proper review.

@Olf0 Olf0 merged commit d1df795 into devel Jul 4, 2024
1 check passed
@Olf0 Olf0 deleted the sailjail branch July 4, 2024 19:50
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.

[Bug] Changes made in settings do not survive app restart
2 participants