diff options
author | Thomas Wienecke <wienecke.t@gmail.com> | 2014-03-14 22:55:14 +0100 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-03-15 11:50:22 -0300 |
commit | 1949acc806e89dc0d2766b2b41eae1cac3186642 (patch) | |
tree | 1baad3b84e7ce42b7394e8ccc66670845cc5ccaf /src/file_search.c | |
parent | c83e8b4dc74ba010e0279b67ef8ffa14103d89f6 (diff) | |
download | rneovim-1949acc806e89dc0d2766b2b41eae1cac3186642.tar.gz rneovim-1949acc806e89dc0d2766b2b41eae1cac3186642.tar.bz2 rneovim-1949acc806e89dc0d2766b2b41eae1cac3186642.zip |
Revive vim_fname (-> os_file_exists); fix misuse of mch_getperm.
* Move vim_fname from misc1 to os/fs:os_file_exists.
* Add unit tests for os_file_exists.
* Replace misuse of mch_getperm with os_file_exists.
Diffstat (limited to 'src/file_search.c')
-rw-r--r-- | src/file_search.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/file_search.c b/src/file_search.c index c80557f7ec..7411e19da0 100644 --- a/src/file_search.c +++ b/src/file_search.c @@ -837,7 +837,7 @@ char_u *vim_findfile(void *search_ctx_arg) for (;; ) { /* if file exists and we didn't already find it */ if ((path_with_url(file_path) - || (mch_getperm(file_path) >= 0 + || (os_file_exists(file_path) && (search_ctx->ffsc_find_what == FINDFILE_BOTH || ((search_ctx->ffsc_find_what @@ -1513,7 +1513,7 @@ find_file_in_path_option ( buf = suffixes; for (;; ) { if ( - (mch_getperm(NameBuff) >= 0 + (os_file_exists(NameBuff) && (find_what == FINDFILE_BOTH || ((find_what == FINDFILE_DIR) == mch_isdir(NameBuff))))) { |