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

Windows config_dir #15

Open
jonahbeckford opened this issue Jul 8, 2023 · 3 comments
Open

Windows config_dir #15

jonahbeckford opened this issue Jul 8, 2023 · 3 comments

Comments

@jonahbeckford
Copy link

Is there any reason that the Roaming %AppData% is chosen as the config_dir in the following

(** {FOLDERID_ApplicationData} *)
let config_dir = get_folderid GUID.ApplicationData

I've commonly seen XDG_CONFIG_HOME mapped to %LocalAppData%, like in https://docs.racket-lang.org/basedir/index.html . Either way makes sense (I'm not objecting), but since I'm evaluating making this package the standard for the DkML Windows distribution (once #14 is addressed) I'd love to understand.

@jonahbeckford
Copy link
Author

Forgot that the other active XDG library (https://v3.ocaml.org/p/xdg/latest) uses LocalAppData in https://github.com/ocaml/dune/blob/8f7bcffb1f797bf2d240430d1be09be462654857/otherlibs/xdg/xdg.ml#L38-L40 :

let config_dir t =
  let home = t.home_dir in
  make t "XDG_CONFIG_HOME" (home / ".config") LocalAppData

So it would be good to harmonize!

@zapashcanon
Copy link
Member

zapashcanon commented Jul 17, 2023

Hi @jonahbeckford

IIRC, I followed what was done in directories-rs and directories-jvm.

It seems a config_local_dir was recently added to directories-rs.

I'm not sure which (roaming/local) is best for the default config dir but I would say roaming as it's usually files one would want to keep in sync (at least that's what I usually do personally on linux: my dotfiles are all sync'ed).

I'm not against doing the same thing as in directories-rs (i.e. adding a local config dir, and having it to point to config_dir on linux/macOS). If you're interested enough to do a PR, I'll merge it. ;)

@jonahbeckford
Copy link
Author

Oh config_local_dir would be good. When I swing back this way (it will be a while) I'll look at doing a PR.

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