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

Look up config dir using XDG_CONFIG_HOME #2673

Merged
merged 1 commit into from Dec 1, 2021

Conversation

Jacalz
Copy link
Member

@Jacalz Jacalz commented Nov 30, 2021

Description:

This switches the config dir lookup from hardcoded $HOME + /.config to reading the $XDG_CONFIG_HOME environment variable using os.UserConfigDir(). This has one very big improvement. It means that Fyne apps running in flatpak don't need to pass though access to the cache directory to use the preference and document storage API. For everyone else, it's basically no change unless a custom $XDG_CONFIG_HOME is set in some situation (our old way is still the fallback).

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.

This switches the config dir lookup from hardcoded $HOME + /.config to
reading the $XDG_CONFIG_HOME environment variable using [os.UserConfigDir()](https://pkg.go.dev/os#UserConfigDir).
This has one very big improvement, it means that Fyne apps running in flatpak don't need to pass though access to
the cache directory. For everyone else, it's basically no change unless a custom $XDG_CONFIG_HOME is set in some situation (our old way is still the fallback).
@Jacalz
Copy link
Member Author

Jacalz commented Dec 1, 2021

I figure that this could be in the release notes as something like "Fixed Preferences and Documents Storage APIs not working out of the box in flatpak".

@Jacalz Jacalz merged commit 256750e into fyne-io:release/v2.1.x Dec 1, 2021
@Jacalz Jacalz deleted the flatpak_configdir branch December 1, 2021 20:01
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.

None yet

3 participants