diff options
author | Daniel Xu <danobi@users.noreply.github.com> | 2016-07-05 22:40:25 -0700 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-07-06 01:40:25 -0400 |
commit | 5f1a153831d480180b2203120cff776d771ec1a4 (patch) | |
tree | 09fc7791734a1e3ed5a72c6e8195707db7e2ece4 /src/nvim/quickfix.c | |
parent | bd6dad06dd1f4182cc65c41575af8bf1e3ea22a9 (diff) | |
download | rneovim-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/quickfix.c')
-rw-r--r-- | src/nvim/quickfix.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index 629e7858b3..dfd795b0ba 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -571,8 +571,9 @@ restofline: *regmatch.endp[i] = c; if (vim_strchr((char_u *)"OPQ", idx) != NULL - && !os_file_exists(namebuf)) + && !os_path_exists(namebuf)) { continue; + } } if ((i = (int)fmt_ptr->addr[1]) > 0) { /* %n */ if (regmatch.startp[i] == NULL) @@ -706,11 +707,12 @@ restofline: } else if (vim_strchr((char_u *)"OPQ", idx) != NULL) { // global file names valid = false; - if (*namebuf == NUL || os_file_exists(namebuf)) { - if (*namebuf && idx == 'P') + if (*namebuf == NUL || os_path_exists(namebuf)) { + if (*namebuf && idx == 'P') { currfile = qf_push_dir(namebuf, &file_stack); - else if (idx == 'Q') + } else if (idx == 'Q') { currfile = qf_pop_dir(&file_stack); + } *namebuf = NUL; if (tail && *tail) { STRMOVE(IObuff, skipwhite(tail)); @@ -1080,7 +1082,7 @@ static int qf_get_fnum(char_u *directory, char_u *fname) * "leaving directory"-messages we might have missed a * directory change. */ - if (!os_file_exists(ptr)) { + if (!os_path_exists(ptr)) { xfree(ptr); directory = qf_guess_filepath(fname); if (directory) @@ -1232,8 +1234,9 @@ static char_u *qf_guess_filepath(char_u *filename) xfree(fullname); fullname = (char_u *)concat_fnames((char *)ds_ptr->dirname, (char *)filename, TRUE); - if (os_file_exists(fullname)) + if (os_path_exists(fullname)) { break; + } ds_ptr = ds_ptr->next; } |