Problem: When the viminfo file can't be renamed there is no error message.
(Vladimir Berezhnoy)
Solution: Check for the rename to fail.
{
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
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 364,
/**/
363,
/**/