summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@zimbu.org>2010-05-14 18:56:38 +0200
committerBram Moolenaar <bram@zimbu.org>2010-05-14 18:56:38 +0200
commit5567d902658f94452b1a7a8408e1459a92287ac8 (patch)
treef43e295a38de3cea35dcbf5b97841ded95ade41f
parentd334bff2e2c212da9f04aa843417f860d55dc208 (diff)
downloadvim-5567d902658f94452b1a7a8408e1459a92287ac8.tar.gz
updated for version 7.2.429v7.2.429v7-2-429
Problem: A file that exists but access is denied may result in a "new file" message. E.g. when its directory is unreadable. Solution: Specifically check for ENOENT to decide a file doesn't exist. (partly by James Vega)
-rw-r--r--src/fileio.c9
-rw-r--r--src/version.c2
2 files changed, 10 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 88188e59..c3679697 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -595,7 +595,11 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
#endif
if (newfile)
{
- if (perm < 0)
+ if (perm < 0
+#ifdef ENOENT
+ && errno == ENOENT
+#endif
+ )
{
/*
* Set the 'new-file' flag, so that when the file has
@@ -664,6 +668,9 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
# ifdef EFBIG
(errno == EFBIG) ? _("[File too big]") :
# endif
+# ifdef EOVERFLOW
+ (errno == EOVERFLOW) ? _("[File too big]") :
+# endif
_("[Permission Denied]")), 0);
curbuf->b_p_ro = TRUE; /* must use "w!" now */
}
diff --git a/src/version.c b/src/version.c
index 499bc472..dc706e7d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -682,6 +682,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 429,
+/**/
428,
/**/
427,