Blame SOURCES/7.4.364

d6ba96
To: vim_dev@googlegroups.com
d6ba96
Subject: Patch 7.4.364
d6ba96
Fcc: outbox
d6ba96
From: Bram Moolenaar <Bram@moolenaar.net>
d6ba96
Mime-Version: 1.0
d6ba96
Content-Type: text/plain; charset=UTF-8
d6ba96
Content-Transfer-Encoding: 8bit
d6ba96
------------
d6ba96
d6ba96
Patch 7.4.364
d6ba96
Problem:    When the viminfo file can't be renamed there is no error message.
d6ba96
	    (Vladimir Berezhnoy)
d6ba96
Solution:   Check for the rename to fail.
d6ba96
Files:	    src/ex_cmds.c
d6ba96
d6ba96
d6ba96
*** ../vim-7.4.363/src/ex_cmds.c	2014-05-22 14:00:12.694534712 +0200
d6ba96
--- src/ex_cmds.c	2014-07-09 21:11:44.531557830 +0200
d6ba96
***************
d6ba96
*** 2004,2014 ****
d6ba96
      {
d6ba96
  	fclose(fp_in);
d6ba96
  
d6ba96
! 	/*
d6ba96
! 	 * In case of an error keep the original viminfo file.
d6ba96
! 	 * Otherwise rename the newly written file.
d6ba96
! 	 */
d6ba96
! 	if (viminfo_errcnt || vim_rename(tempname, fname) == -1)
d6ba96
  	    mch_remove(tempname);
d6ba96
  
d6ba96
  #ifdef WIN3264
d6ba96
--- 2004,2017 ----
d6ba96
      {
d6ba96
  	fclose(fp_in);
d6ba96
  
d6ba96
! 	/* In case of an error keep the original viminfo file.  Otherwise
d6ba96
! 	 * rename the newly written file.  Give an error if that fails. */
d6ba96
! 	if (viminfo_errcnt == 0 && vim_rename(tempname, fname) == -1)
d6ba96
! 	{
d6ba96
! 	    ++viminfo_errcnt;
d6ba96
! 	    EMSG2(_("E886: Can't rename viminfo file to %s!"), fname);
d6ba96
! 	}
d6ba96
! 	if (viminfo_errcnt > 0)
d6ba96
  	    mch_remove(tempname);
d6ba96
  
d6ba96
  #ifdef WIN3264
d6ba96
*** ../vim-7.4.363/src/version.c	2014-07-09 20:51:04.519583033 +0200
d6ba96
--- src/version.c	2014-07-09 21:13:18.575555919 +0200
d6ba96
***************
d6ba96
*** 736,737 ****
d6ba96
--- 736,739 ----
d6ba96
  {   /* Add new patch number below this line */
d6ba96
+ /**/
d6ba96
+     364,
d6ba96
  /**/
d6ba96
d6ba96
-- 
d6ba96
MONK: ... and the Lord spake, saying, "First shalt thou take out the Holy Pin,
d6ba96
      then shalt thou count to three, no more, no less.  Three shalt be the
d6ba96
      number thou shalt count, and the number of the counting shalt be three.
d6ba96
      Four shalt thou not count, neither count thou two, excepting that thou
d6ba96
      then proceed to three.  Five is right out.  Once the number three, being
d6ba96
      the third number, be reached, then lobbest thou thy Holy Hand Grenade of
d6ba96
      Antioch towards thou foe, who being naughty in my sight, shall snuff it.
d6ba96
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
d6ba96
d6ba96
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
d6ba96
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
d6ba96
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
d6ba96
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///