xdg-rs/dirs

XDG user dirs should default to `$HOME`

Opened this issue · 0 comments

If ${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs does not exist, or lacks the specified key (e.g. XDG_DOWNLOAD_DIR), the behaviour of xdg-user-dir the CLI program is to output $HOME.

In the same case, the behaviour of dirs_next::download_dir() (for example) is to return None.

There's no specification as such for '"well known" user directories', but it's implied that this is the intended fall-back behaviour:

Note: To disable a directory, point it to the homedir.

https://www.freedesktop.org/wiki/Software/xdg-user-dirs/

cf. tauri-apps/tauri#3090