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

Support Config File Directory Specification of Various Platforms #28

Merged
merged 1 commit into from
Aug 25, 2021

Conversation

WhiredPlanck
Copy link
Contributor

As for now, Macast has the config file directory hardcoded, reading and writing the config file in a fixed folder. For some users, this makes a little difficult to manage their config files, especially for Linux desktop users who don't want annoying dot files in their $HOME.

So I introduce appdirs module in this PR to fix #20 , it's very convenient to use it to get user config directory. For Linux, it meets XDG Base Directory specification while meets the specification of macOS and Windows at the same time.

As @icepie says, $HOME/.config/macast can also apply for all platforms, just from pathlib import Path and invoke Path.home() to find $HOME. I just pick one of various methods in this case.

This PR compare the branch with dev.

@xfangfang xfangfang merged commit d913480 into xfangfang:dev Aug 25, 2021
@WhiredPlanck WhiredPlanck deleted the appdirs branch August 27, 2021 15:00
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.

2 participants