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

Switch to user_config_dir #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Serial-ATA
Copy link
Contributor

I think these files are better suited for the config dir. I'm always going there looking for the files and getting thrown off when I can't find them 😅.

@probablykasper
Copy link
Owner

probablykasper commented Aug 11, 2022

It looks like appdirs.user_config_dir points to ~/Library/Preferences on macOS, which goes against OS guidelines:

Preferences

Contains the user’s preferences. You should never create files in this directory yourself. To get or set preference values, you should always use the NSUserDefaults class or an equivalent system-provided interface.

Opened ActiveState/appdirs#185 about that

@Serial-ATA
Copy link
Contributor Author

appdirs doesn't really seem to be maintained. Should another library be used instead?

@probablykasper
Copy link
Owner

Could do that if there's a good alternative out there

@Serial-ATA
Copy link
Contributor Author

Yeah, I looked around and couldn't find anything 🤷. I'll make a PR and hope it gets noticed.

@Serial-ATA
Copy link
Contributor Author

I doubt the PR will get any attention, so I just made a special case for macOS.

@probablykasper
Copy link
Owner

It actually looks like using platformdirs is a good alternative. They have the same problem, but it's being maintained - opened tox-dev/platformdirs#98

I also think the roaming folder should probably be used on Windows

vidl/config.py Outdated Show resolved Hide resolved
@Serial-ATA
Copy link
Contributor Author

I wonder if these projects would even be willing to make such a change, given how old they are.

@probablykasper
Copy link
Owner

We'd have to see what they say in the issue I suppose

In the meantime it would be fine to keep the special macOS handling

@Serial-ATA
Copy link
Contributor Author

I'm not familiar with macOS, the path would be ~/Library/Application Support/Kasper Henningsen.vidl right? I was looking here, but I'm not sure.

@probablykasper
Copy link
Owner

Reverse domain name notation is used sometimes (I use space.kasper.<appname> for desktop apps), so it would be space.kasper.vidl in that case. For vidl, I'm not sure I'd want to use that if it's just on one platform though

@Serial-ATA
Copy link
Contributor Author

So just ~/Library/Application Support/vidl?

@probablykasper
Copy link
Owner

yeah, and that's also what's used currently

@Serial-ATA
Copy link
Contributor Author

Alright, should be good now.

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