diff options
author | Stefan Hoffmann <stefan991@gmail.com> | 2014-05-02 20:08:36 +0200 |
---|---|---|
committer | Stefan Hoffmann <stefan991@gmail.com> | 2014-05-09 15:49:33 +0200 |
commit | 8e8dae71da51f068243ecda05bc250d59918f15b (patch) | |
tree | 18c3c1052dcb1cfc32d32ef232e76b30db9b2369 /src/quickfix.c | |
parent | 902ad8d94d9a1eafde858793587037e620c6ee6f (diff) | |
download | rneovim-8e8dae71da51f068243ecda05bc250d59918f15b.tar.gz rneovim-8e8dae71da51f068243ecda05bc250d59918f15b.tar.bz2 rneovim-8e8dae71da51f068243ecda05bc250d59918f15b.zip |
replaced some mch_lstat()
Diffstat (limited to 'src/quickfix.c')
-rw-r--r-- | src/quickfix.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/quickfix.c b/src/quickfix.c index 91ebe9795b..94b2b05501 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -2573,9 +2573,6 @@ static char_u *get_mef_name(void) char_u *name; static int start = -1; static int off = 0; -#ifdef HAVE_LSTAT - struct stat sb; -#endif if (*p_mef == NUL) { name = vim_tempname('e'); @@ -2602,13 +2599,12 @@ static char_u *get_mef_name(void) STRCPY(name, p_mef); sprintf((char *)name + (p - p_mef), "%d%d", start, off); STRCAT(name, p + 2); - if (!os_file_exists(name) -#ifdef HAVE_LSTAT - /* Don't accept a symbolic link, its a security risk. */ - && mch_lstat((char *)name, &sb) < 0 -#endif - ) + // Don't accept a symbolic link, its a security risk. + FileInfo file_info; + bool file_or_link_found = os_get_file_info_link((char *)name, &file_info); + if (!file_or_link_found) { break; + } free(name); } return name; |