diff options
-rw-r--r-- | src/nvim/fileio.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 1bee50b717..4aa4d4c399 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -578,11 +578,11 @@ readfile ( return OK; /* a new file is not an error */ } else { filemess(curbuf, sfname, (char_u *)( -# ifdef EFBIG - (errno == EFBIG) ? _("[File too big]") : -# endif -# ifdef EOVERFLOW - (errno == EOVERFLOW) ? _("[File too big]") : + (fd == UV_EFBIG) ? _("[File too big]") : +# if defined(UNIX) && defined(EOVERFLOW) + // libuv only returns -errno in Unix and in Windows open() does not + // set EOVERFLOW + (fd == -EOVERFLOW) ? _("[File too big]") : # endif _("[Permission Denied]")), 0); curbuf->b_p_ro = TRUE; /* must use "w!" now */ |