Support Config File Directory Specification of Various Platforms #28
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.
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, justfrom pathlib import Path
and invokePath.home()
to find$HOME
. I just pick one of various methods in this case.This PR compare the branch with
dev
.