aboutsummaryrefslogtreecommitdiff
path: root/src/memline.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/memline.c')
-rw-r--r--src/memline.c7
1 files changed, 2 insertions, 5 deletions
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;