From edbb687b73877d8db8b1c6e376e3422bb85a11a9 Mon Sep 17 00:00:00 2001 From: Stefan Hoffmann Date: Fri, 25 Apr 2014 16:01:41 +0200 Subject: replaced some mch_stat() with os_file_exists() --- src/memline.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/memline.c') diff --git a/src/memline.c b/src/memline.c index 53864e6b5d..a78b84512b 100644 --- a/src/memline.c +++ b/src/memline.c @@ -1607,12 +1607,9 @@ recover_names ( * Try finding a swap file by simply adding ".swp" to the file name. */ if (*dirp == NUL && file_count + num_files == 0 && fname != NULL) { - struct stat st; - char_u *swapname; - - swapname = modname(fname_res, (char_u *)".swp", TRUE); + char_u *swapname = modname(fname_res, (char_u *)".swp", TRUE); if (swapname != NULL) { - if (mch_stat((char *)swapname, &st) != -1) { /* It exists! */ + if (os_file_exists(swapname)) { files = (char_u **)alloc((unsigned)sizeof(char_u *)); files[0] = swapname; swapname = NULL; -- cgit