aboutsummaryrefslogtreecommitdiff
path: root/src/memline.c
diff options
context:
space:
mode:
authorStefan Hoffmann <stefan991@gmail.com>2014-04-25 16:01:41 +0200
committerStefan Hoffmann <stefan991@gmail.com>2014-05-09 15:49:32 +0200
commitedbb687b73877d8db8b1c6e376e3422bb85a11a9 (patch)
treef4b6af6d46561876e3aa559ca75621a92f7bbe3f /src/memline.c
parentf3dda65de157f2d7c35286018c20cbc7597ed748 (diff)
downloadrneovim-edbb687b73877d8db8b1c6e376e3422bb85a11a9.tar.gz
rneovim-edbb687b73877d8db8b1c6e376e3422bb85a11a9.tar.bz2
rneovim-edbb687b73877d8db8b1c6e376e3422bb85a11a9.zip
replaced some mch_stat() with os_file_exists()
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;