aboutsummaryrefslogtreecommitdiff
path: root/src/undo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/undo.c')
-rw-r--r--src/undo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/undo.c b/src/undo.c
index d1c3cc92ed..67e7fe7a36 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -1173,7 +1173,7 @@ void u_write_undo(char_u *name, int forceit, buf_T *buf, char_u *hash)
/* If the undo file already exists, verify that it actually is an undo
* file, and delete it. */
- if (mch_getperm(file_name) >= 0) {
+ if (os_file_exists(file_name)) {
if (name == NULL || !forceit) {
/* Check we can read it and it's an undo file. */
fd = mch_open((char *)file_name, O_RDONLY|O_EXTRA, 0);