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

data_dir seems to wrongly be local. #58

Closed
gl-yziquel opened this issue Jun 30, 2024 · 1 comment
Closed

data_dir seems to wrongly be local. #58

gl-yziquel opened this issue Jun 30, 2024 · 1 comment

Comments

@gl-yziquel
Copy link

gl-yziquel commented Jun 30, 2024

This is a bug coming from the just tool:

casey/just#2212

It seems that data_dir() returns some local folder such as /home/mini-me/.local/share and not some system wide folder such as /usr/local/share.

Maybe there is something that I don't quite get, but this seems to more or less be intended behaviour, when looking at the codebase of dirs-rs.

@soc
Copy link
Collaborator

soc commented Jun 30, 2024

Correct.

There are some platforms (like Windows) that distinguish(ed) between user data that's stored on the machine and user data that is associated with a user account and synced to the machine when the user logs in.

data_dir vs. data_local_dir allows you to select the appropriate one, even if it may not make a difference on the operating system you are currently running on.
(Similar with config_dir vs. preferences_dir.)

@soc soc closed this as completed Jun 30, 2024
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

No branches or pull requests

2 participants