updated for version 7.4.364
Problem: When the viminfo file can't be renamed there is no error message.
(Vladimir Berezhnoy)
Solution: Check for the rename to fail.
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 2e5917f..62621bf 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -2004,11 +2004,14 @@
{
fclose(fp_in);
- /*
- * In case of an error keep the original viminfo file.
- * Otherwise rename the newly written file.
- */
- if (viminfo_errcnt || vim_rename(tempname, fname) == -1)
+ /* In case of an error keep the original viminfo file. Otherwise
+ * rename the newly written file. Give an error if that fails. */
+ if (viminfo_errcnt == 0 && vim_rename(tempname, fname) == -1)
+ {
+ ++viminfo_errcnt;
+ EMSG2(_("E886: Can't rename viminfo file to %s!"), fname);
+ }
+ if (viminfo_errcnt > 0)
mch_remove(tempname);
#ifdef WIN3264
diff --git a/src/version.c b/src/version.c
index 150a950..0bfd039 100644
--- a/src/version.c
+++ b/src/version.c
@@ -735,6 +735,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 364,
+/**/
363,
/**/
362,