Skip to content

Conversation

@hyperupcall
Copy link
Contributor

@hyperupcall hyperupcall commented Aug 5, 2021

PR #173 made it possible to easily change the configPath for mume. This changes the default to ~/.config/mume instead of ~/.mume (but only if ~/.mume does not exist!) to remove clutter in the home directory.

This would close #66

To preserve compatibility, it only does this if the old location
(`~/.mume`) does not exist
@hyperupcall hyperupcall changed the title Default to XDG_CONFIG_HOME Default to XDG_CONFIG_HOME/mume instead of ~/.mume for configPath Aug 5, 2021
@shd101wyy
Copy link
Owner

Would this work on Windows? Thanks!

Since the XDG Base Directory Specification shouldn't be followed on
windows, we make sure to use the old format if the underlying platform
is deteted to be windows
@hyperupcall
Copy link
Contributor Author

hyperupcall commented Aug 5, 2021

Oh right! The XDG Base Directory Specification shouldn't be followed on Windows. I'll fix that really quickly

@hyperupcall
Copy link
Contributor Author

hyperupcall commented Aug 5, 2021

Cool beans - so now it is now correct for windows. I'll add that this also enables the behavior for macOS and other Unix platforms. In my opinion, it's okay to check for (and use) $XDG_CONFIG_HOME on macOS for utility libraries like this, even if macOS is not strictly Linux. This also matches the behavior of many Bash scripts, and the like

@shd101wyy shd101wyy self-requested a review August 5, 2021 14:57
Copy link
Owner

@shd101wyy shd101wyy left a comment

Choose a reason for hiding this comment

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

Looks really good to me. Thanks a lot :)

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.

.mume directory is created in home directory not in .atom directory

2 participants