aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/path.c
diff options
context:
space:
mode:
authorDaniel Xu <danobi@users.noreply.github.com>2016-07-05 22:40:25 -0700
committerJustin M. Keyes <justinkz@gmail.com>2016-07-06 01:40:25 -0400
commit5f1a153831d480180b2203120cff776d771ec1a4 (patch)
tree09fc7791734a1e3ed5a72c6e8195707db7e2ece4 /src/nvim/path.c
parentbd6dad06dd1f4182cc65c41575af8bf1e3ea22a9 (diff)
downloadrneovim-5f1a153831d480180b2203120cff776d771ec1a4.tar.gz
rneovim-5f1a153831d480180b2203120cff776d771ec1a4.tar.bz2
rneovim-5f1a153831d480180b2203120cff776d771ec1a4.zip
os/fs: Rename os_file_exists to os_path_exists (#4973)
Because the old name did not indicate that the function would return true on directories as well.
Diffstat (limited to 'src/nvim/path.c')
-rw-r--r--src/nvim/path.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c
index 41fd69f238..57499429ec 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -684,7 +684,7 @@ static size_t do_path_expand(garray_T *gap, const char_u *path,
}
// add existing file or symbolic link
if ((flags & EW_ALLLINKS) ? os_fileinfo_link((char *)buf, &file_info)
- : os_file_exists(buf)) {
+ : os_path_exists(buf)) {
addfile(gap, buf, flags);
}
}
@@ -1205,10 +1205,11 @@ int gen_expand_wildcards(int num_pat, char_u **pat, int *num_file,
/* When EW_NOTFOUND is used, always add files and dirs. Makes
* "vim c:/" work. */
- if (flags & EW_NOTFOUND)
+ if (flags & EW_NOTFOUND) {
addfile(&ga, t, flags | EW_DIR | EW_FILE);
- else if (os_file_exists(t))
+ } else if (os_path_exists(t)) {
addfile(&ga, t, flags);
+ }
xfree(t);
}
@@ -1327,7 +1328,7 @@ void addfile(
if (!(flags & EW_NOTFOUND)
&& ((flags & EW_ALLLINKS)
? !os_fileinfo_link((char *)f, &file_info)
- : !os_file_exists(f))) {
+ : !os_path_exists(f))) {
return;
}