diff options
author | Michael Lingelbach <m.j.lbach@gmail.com> | 2021-01-13 14:20:21 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-13 23:20:21 +0100 |
commit | ea8756f85ddd0aeed2e7eccd0ea86ade4fb7eca8 (patch) | |
tree | 1db34b1738a52f520ea7dd618916729e040a0b9a /src/nvim/os/stdpaths.c | |
parent | 77a6049e07d070470d3274348ac61ab9b96cac6f (diff) | |
download | rneovim-ea8756f85ddd0aeed2e7eccd0ea86ade4fb7eca8.tar.gz rneovim-ea8756f85ddd0aeed2e7eccd0ea86ade4fb7eca8.tar.bz2 rneovim-ea8756f85ddd0aeed2e7eccd0ea86ade4fb7eca8.zip |
logging: move to XDG_CACHE_HOME (#13739)
while there is some controversy, stdpath('cache') looks like a better fit for logs than stdpath('data'): you can remove logs without preventing nvim to work which fits the XDG_CACHE_HOME definition of `user specific non-essential data files`.
Diffstat (limited to 'src/nvim/os/stdpaths.c')
-rw-r--r-- | src/nvim/os/stdpaths.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/os/stdpaths.c b/src/nvim/os/stdpaths.c index 66bc990402..93b8d5ca12 100644 --- a/src/nvim/os/stdpaths.c +++ b/src/nvim/os/stdpaths.c @@ -108,6 +108,17 @@ char *get_xdg_home(const XDGVarType idx) return dir; } +/// Return subpath of $XDG_CACHE_HOME +/// +/// @param[in] fname New component of the path. +/// +/// @return [allocated] `$XDG_CACHE_HOME/nvim/{fname}` +char *stdpaths_user_cache_subpath(const char *fname) + FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL FUNC_ATTR_NONNULL_RET +{ + return concat_fnames_realloc(get_xdg_home(kXDGCacheHome), fname, true); +} + /// Return subpath of $XDG_CONFIG_HOME /// /// @param[in] fname New component of the path. |