Merge pull request #1188 from Shougo/vim-patch-7.4.364

vim-patch:7.4.364
This commit is contained in:
Justin M. Keyes 2014-09-19 17:46:55 -04:00
commit 1fdfe3a484
2 changed files with 8 additions and 6 deletions

View File

@ -1648,11 +1648,13 @@ void write_viminfo(char_u *file, int forceit)
if (fp_in != NULL) {
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) {
os_remove((char *)tempname);
}
}

View File

@ -231,7 +231,7 @@ static int included_patches[] = {
367,
//366,
365,
//364,
364,
//363,
362,
361,