mirror of
https://github.com/neovim/neovim.git
synced 2025-01-01 17:23:36 -07:00
ce0fddf5ae
Problem:
If vim_tempdir mysteriously goes missing (typically by "antivirus" on
Windows), any plugins using tempname() will be broken for the rest of
the session. #1432 #9833 https://groups.google.com/g/vim_use/c/ef55jNm5czI
Steps:
mkdir foo
TMPDIR=./foo nvim
:echo tempname()
!rm -r foo
:echo tempname()
tempname() still uses the foo path even though it was deleted.
Solution:
- Don't assume that vim_tempdir exists.
- If it goes missing once, retry vim_mktempdir and log (silently) an error.
- If it goes missing again, retry vim_mktempdir and show an error.
Rejected in Vim for performance reasons:
https://groups.google.com/g/vim_use/c/qgRob9SWDv8/m/FAOFVVcDTv0J
https://groups.google.com/g/vim_dev/c/cogp-Vye4oo/m/d_SVFXBbnnoJ
But, logging shows that `vim_gettempdir` is not called frequently.
Fixes #1432
Fixes #9833
Fixes #11250
Related: stdpath("run")
|
||
---|---|---|
.. | ||
channels_spec.lua | ||
exit_spec.lua | ||
fileio_spec.lua | ||
job_spec.lua | ||
log_spec.lua | ||
main_spec.lua | ||
path_spec.lua | ||
remote_spec.lua | ||
spellfile_spec.lua | ||
startup_spec.lua |