Skip to content

Commit

Permalink
updated for version 7.4.364
Browse files Browse the repository at this point in the history
Problem:    When the viminfo file can't be renamed there is no error message.
            (Vladimir Berezhnoy)
Solution:   Check for the rename to fail.
  • Loading branch information
brammool committed Jul 9, 2014
1 parent 4550091 commit 3ed8b13
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/ex_cmds.c
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -734,6 +734,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
364,
/**/
363,
/**/
Expand Down

0 comments on commit 3ed8b13

Please sign in to comment.