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

Move config directory #126

Merged

Conversation

jonstodle
Copy link
Contributor

This changes the config directory from the dirs::cache_dir to dirs::config_dir. It does however keep the cache directory as the default logging directory, as it seems a better fit.

It also adds a function, migrate_config, which is called at startup to move directory entries inside the "old" config directory to the "new" one (but it skips moving log files). The intention is that this function can be removed after a few releases when the likelihood of someone upgrading from 0.6.0 or earlier is fairly small.

Fixes #98

This changes the config directory from the `dirs::cache_dir` to `dirs::config_dir`. It does however keep the cache directory as the default logging directory, as it seems a better fit.

It also adds a function, `migrate_config`, which is called at startup to move directory entries inside the "old" config directory to the "new" one (but it skips moving log files). The intention is that this function can be removed after a few releases when the likelihood of someone upgrading from 0.6.0 or earlier is fairly small.

Fixes gitui-org#98
@extrawurst extrawurst merged commit 212ce86 into gitui-org:master Jun 14, 2020
@extrawurst
Copy link
Collaborator

Really cool! Thanks for tackling this!❤️

});

for entry in entries {
let mut config_path: PathBuf = get_app_config_path()?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

one minor thing: we can move out the call to get_app_config_path outside the loop and keep using a clone of it. just pushed that: c6eb066

@jonstodle jonstodle deleted the move-default-config-directory branch July 27, 2020 17: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.

Suggest moving theme.ron from XDG_CACHE_HOME to XDG_CONFIG_HOME
2 participants