0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

updated for version 7.4.684

Problem:    When starting several Vim instances in diff mode, the temp files
            used may not be unique. (Issue 353)
Solution:   Add an argument to vim_tempname() to keep the file.
This commit is contained in:
Bram Moolenaar
2015-03-31 13:33:08 +02:00
parent 1ca2e361a8
commit e5c421cfd7
13 changed files with 29 additions and 24 deletions

View File

@@ -1158,8 +1158,8 @@ do_filter(line1, line2, eap, cmd, do_in, do_out)
}
else
#endif
if ((do_in && (itmp = vim_tempname('i')) == NULL)
|| (do_out && (otmp = vim_tempname('o')) == NULL))
if ((do_in && (itmp = vim_tempname('i', FALSE)) == NULL)
|| (do_out && (otmp = vim_tempname('o', FALSE)) == NULL))
{
EMSG(_(e_notmp));
goto filterend;
@@ -1963,7 +1963,7 @@ write_viminfo(file, forceit)
if (fp_out == NULL)
{
vim_free(tempname);
if ((tempname = vim_tempname('o')) != NULL)
if ((tempname = vim_tempname('o', TRUE)) != NULL)
fp_out = mch_fopen((char *)tempname, WRITEBIN);
}