diff options
author | ZyX <kp-pav@yandex.ru> | 2015-10-17 15:51:31 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2015-10-23 14:54:10 +0300 |
commit | a1b0f4073deb7f50e1b7137174bcb9914c97078f (patch) | |
tree | 742f737ad6ccf9e5da6515641edc0214fd2a6134 /src/nvim/os/stdpaths.c | |
parent | a06a8bad6080e605c25124446c7441cee8911234 (diff) | |
download | rneovim-a1b0f4073deb7f50e1b7137174bcb9914c97078f.tar.gz rneovim-a1b0f4073deb7f50e1b7137174bcb9914c97078f.tar.bz2 rneovim-a1b0f4073deb7f50e1b7137174bcb9914c97078f.zip |
stdpaths: Do NOT create data directories
This is none of option.c business to create *possibly unneeded* **default**
directories **before** user specified where he actually wants to place the
files.
Diffstat (limited to 'src/nvim/os/stdpaths.c')
-rw-r--r-- | src/nvim/os/stdpaths.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/nvim/os/stdpaths.c b/src/nvim/os/stdpaths.c index e242cd3d69..167a53c985 100644 --- a/src/nvim/os/stdpaths.c +++ b/src/nvim/os/stdpaths.c @@ -64,18 +64,6 @@ static char *get_xdg_home(const XDGVarType idx) return dir; } -static void create_dir(const char *dir, int mode) - FUNC_ATTR_NONNULL_ALL -{ - char *failed; - int err; - if ((err = os_mkdir_recurse(dir, mode, &failed)) != 0) { - EMSG3(_("E920: Failed to create data directory %s: %s"), failed, - os_strerror(-err)); - xfree(failed); - } -} - char *stdpaths_user_conf_subpath(const char *fname) FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL { @@ -85,9 +73,5 @@ char *stdpaths_user_conf_subpath(const char *fname) char *stdpaths_user_data_subpath(const char *fname) FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL { - char *dir = concat_fnames_realloc(get_xdg_home(kXDGDataHome), fname, true); - if (!os_isdir((char_u *)dir)) { - create_dir(dir, 0755); - } - return dir; + return concat_fnames_realloc(get_xdg_home(kXDGDataHome), fname, true); } |