ocaml-community / utop

Universal toplevel for OCaml
Other
833 stars 110 forks source link

Correct paths for utop-history, utoprc: in utop subdirs of XDG base dirs #484

Open tuohy opened 3 months ago

tuohy commented 3 months ago

Issue #481 described failure to load utoprc from its stated location PR #475 misidentified the issue as an incorrect README

In fact the paths were pointing to files within the XDG base directories themselves rather than in a subdirectory for the utop application.

This patch simply changes $XDG_STATE_HOME/utop-history to $XDG_STATE_HOME/utop/utop-history and $XDG_CONFIG_HOME/utoprc to $XDG_CONFIG_HOME/utop/utoprc

tuohy commented 3 months ago

Added check & creation of history file's parent directory, fixing #478

This was exacerbated with the first patch because XDG_STATE_HOME/utop was extremely unlikely to exist on any system