Use the app config dir to save the QSettings file. #105
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).