]> granicus.if.org Git - vim/commitdiff
updated for version 7.2.429 v7.2.429
authorBram Moolenaar <Bram@vim.org>
Fri, 14 May 2010 16:56:38 +0000 (18:56 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 14 May 2010 16:56:38 +0000 (18:56 +0200)
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)

src/fileio.c
src/version.c

index 88188e5979417eea465f8798cf3c16b2fd4a7a23..c36796972530a7c1f9b1b8ef96fc0467e1d3e585 100644 (file)
@@ -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
@@ -663,6 +667,9 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
                    filemess(curbuf, sfname, (char_u *)(
 # 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 */
index 499bc4720bbbab94122c2e8d6d787fc58c069ce8..dc706e7d9ccadbc55351525677657401ae23ea22 100644 (file)
@@ -681,6 +681,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    429,
 /**/
     428,
 /**/