mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch: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. https://code.google.com/p/vim/source/detail?r=v7-4-364
This commit is contained in:
parent
53d15c2c25
commit
9829febebc
@ -1648,11 +1648,13 @@ void write_viminfo(char_u *file, int forceit)
|
|||||||
if (fp_in != NULL) {
|
if (fp_in != NULL) {
|
||||||
fclose(fp_in);
|
fclose(fp_in);
|
||||||
|
|
||||||
/*
|
/* In case of an error keep the original viminfo file. Otherwise
|
||||||
* In case of an error keep the original viminfo file.
|
* rename the newly written file. Give an error if that fails. */
|
||||||
* Otherwise rename the newly written file.
|
if (viminfo_errcnt == 0 && vim_rename(tempname, fname) == -1) {
|
||||||
*/
|
viminfo_errcnt++;
|
||||||
if (viminfo_errcnt || vim_rename(tempname, fname) == -1) {
|
EMSG2(_("E886: Can't rename viminfo file to %s!"), fname);
|
||||||
|
}
|
||||||
|
if (viminfo_errcnt > 0) {
|
||||||
os_remove((char *)tempname);
|
os_remove((char *)tempname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -231,7 +231,7 @@ static int included_patches[] = {
|
|||||||
367,
|
367,
|
||||||
//366,
|
//366,
|
||||||
365,
|
365,
|
||||||
//364,
|
364,
|
||||||
//363,
|
//363,
|
||||||
362,
|
362,
|
||||||
//361,
|
//361,
|
||||||
|
Loading…
Reference in New Issue
Block a user