OCamlPro / directories

directories is an OCaml library that provides configuration, cache and data paths (and more!) following the suitable conventions on Linux, macOS and Windows. The following conventions are used: XDG Base Directory Specification and xdg-user-dirs on Linux, Known Folders on Windows, Standard Directories on macOS.
ISC License
33 stars 3 forks source link

xdg-user-dirs broken on linux #5

Closed zapashcanon closed 4 years ago

zapashcanon commented 4 years ago

it's because $XDG_CONFIG_HOME/user-dirs.dirs isn't automatically exported, so we should do something like:

test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && source ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
echo ${XDG_DESKTOP_DIR:-$HOME/Desktop}
echo ...

and get all values.