aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r--src/nvim/fileio.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c
index c07597df47..1bee50b717 100644
--- a/src/nvim/fileio.c
+++ b/src/nvim/fileio.c
@@ -535,11 +535,7 @@ readfile (
if (!newfile) {
return FAIL;
}
- if (perm < 0
-#ifdef ENOENT
- && errno == ENOENT
-#endif
- ) {
+ if (perm == UV_ENOENT) {
/*
* Set the 'new-file' flag, so that when the file has
* been created by someone else, a ":w" will complain.