|
Karsten Hopp |
79f50e |
To: vim-dev@vim.org
|
|
Karsten Hopp |
79f50e |
Subject: Patch 7.2.429
|
|
Karsten Hopp |
79f50e |
Fcc: outbox
|
|
Karsten Hopp |
79f50e |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
79f50e |
Mime-Version: 1.0
|
|
Karsten Hopp |
79f50e |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
79f50e |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
79f50e |
------------
|
|
Karsten Hopp |
79f50e |
|
|
Karsten Hopp |
79f50e |
Patch 7.2.429
|
|
Karsten Hopp |
79f50e |
Problem: A file that exists but access is denied may result in a "new file"
|
|
Karsten Hopp |
79f50e |
message. E.g. when its directory is unreadable.
|
|
Karsten Hopp |
79f50e |
Solution: Specifically check for ENOENT to decide a file doesn't exist.
|
|
Karsten Hopp |
79f50e |
(partly by James Vega)
|
|
Karsten Hopp |
79f50e |
Files: src/fileio.c
|
|
Karsten Hopp |
79f50e |
|
|
Karsten Hopp |
79f50e |
|
|
Karsten Hopp |
79f50e |
*** ../vim-7.2.428/src/fileio.c 2010-03-02 12:47:58.000000000 +0100
|
|
Karsten Hopp |
79f50e |
--- src/fileio.c 2010-05-14 18:30:09.000000000 +0200
|
|
Karsten Hopp |
79f50e |
***************
|
|
Karsten Hopp |
79f50e |
*** 595,601 ****
|
|
Karsten Hopp |
79f50e |
#endif
|
|
Karsten Hopp |
79f50e |
if (newfile)
|
|
Karsten Hopp |
79f50e |
{
|
|
Karsten Hopp |
79f50e |
! if (perm < 0)
|
|
Karsten Hopp |
79f50e |
{
|
|
Karsten Hopp |
79f50e |
/*
|
|
Karsten Hopp |
79f50e |
* Set the 'new-file' flag, so that when the file has
|
|
Karsten Hopp |
79f50e |
--- 595,605 ----
|
|
Karsten Hopp |
79f50e |
#endif
|
|
Karsten Hopp |
79f50e |
if (newfile)
|
|
Karsten Hopp |
79f50e |
{
|
|
Karsten Hopp |
79f50e |
! if (perm < 0
|
|
Karsten Hopp |
79f50e |
! #ifdef ENOENT
|
|
Karsten Hopp |
79f50e |
! && errno == ENOENT
|
|
Karsten Hopp |
79f50e |
! #endif
|
|
Karsten Hopp |
79f50e |
! )
|
|
Karsten Hopp |
79f50e |
{
|
|
Karsten Hopp |
79f50e |
/*
|
|
Karsten Hopp |
79f50e |
* Set the 'new-file' flag, so that when the file has
|
|
Karsten Hopp |
79f50e |
***************
|
|
Karsten Hopp |
79f50e |
*** 664,669 ****
|
|
Karsten Hopp |
79f50e |
--- 668,676 ----
|
|
Karsten Hopp |
79f50e |
# ifdef EFBIG
|
|
Karsten Hopp |
79f50e |
(errno == EFBIG) ? _("[File too big]") :
|
|
Karsten Hopp |
79f50e |
# endif
|
|
Karsten Hopp |
79f50e |
+ # ifdef EOVERFLOW
|
|
Karsten Hopp |
79f50e |
+ (errno == EOVERFLOW) ? _("[File too big]") :
|
|
Karsten Hopp |
79f50e |
+ # endif
|
|
Karsten Hopp |
79f50e |
_("[Permission Denied]")), 0);
|
|
Karsten Hopp |
79f50e |
curbuf->b_p_ro = TRUE; /* must use "w!" now */
|
|
Karsten Hopp |
79f50e |
}
|
|
Karsten Hopp |
79f50e |
*** ../vim-7.2.428/src/version.c 2010-05-14 18:10:23.000000000 +0200
|
|
Karsten Hopp |
79f50e |
--- src/version.c 2010-05-14 18:55:11.000000000 +0200
|
|
Karsten Hopp |
79f50e |
***************
|
|
Karsten Hopp |
79f50e |
*** 683,684 ****
|
|
Karsten Hopp |
79f50e |
--- 683,686 ----
|
|
Karsten Hopp |
79f50e |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
79f50e |
+ /**/
|
|
Karsten Hopp |
79f50e |
+ 429,
|
|
Karsten Hopp |
79f50e |
/**/
|
|
Karsten Hopp |
79f50e |
|
|
Karsten Hopp |
79f50e |
--
|
|
Karsten Hopp |
79f50e |
Those who live by the sword get shot by those who don't.
|
|
Karsten Hopp |
79f50e |
|
|
Karsten Hopp |
79f50e |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
79f50e |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
79f50e |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
79f50e |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|