# HG changeset patch # User Bram Moolenaar # Date 1404933484 -7200 # Node ID 7b324826757595b21b0410a7b6f00227d73c655f # Parent 17e9c2874a581c3f682e8295d758d1c519f015d3 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 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -2004,11 +2004,14 @@ write_viminfo(file, forceit) { 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 --- a/src/version.c +++ b/src/version.c @@ -735,6 +735,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 364, +/**/ 363, /**/ 362,