Files
neovim/runtime/doc
Justin M. Keyes ce0fddf5ae feat: try to recover from missing tempdir #22573
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") f50135a32e
2023-03-09 05:07:36 -08:00
..
2023-02-22 00:07:26 +08:00
2023-03-03 15:07:23 +01:00
2023-02-03 09:18:18 +01:00
2023-03-07 11:41:35 +08:00
2023-02-03 09:18:18 +01:00
2021-09-10 08:48:27 +02:00
2022-02-27 11:56:30 +01:00
2023-01-01 15:05:13 +01:00
2023-01-01 15:05:13 +01:00
2023-02-22 00:07:26 +08:00
2023-02-22 00:07:26 +08:00
2023-01-01 15:05:13 +01:00
2023-02-22 00:07:26 +08:00
2023-01-01 15:05:13 +01:00
2022-10-14 08:01:13 -07:00
2023-02-22 00:07:26 +08:00
2022-12-11 18:41:26 -08:00
2018-10-29 09:55:07 +01:00
2018-10-29 09:55:07 +01:00
2022-11-10 09:05:25 +00:00
2015-08-15 15:25:30 -03:00
2023-02-22 00:07:26 +08:00
2023-02-03 09:18:18 +01:00
2023-02-22 00:07:26 +08:00
2023-01-01 15:05:13 +01:00
2022-09-26 17:43:23 +08:00
2023-02-20 15:12:59 +08:00
2023-01-01 15:05:13 +01:00
2023-02-27 19:50:59 +01:00
2022-07-26 11:26:23 +02:00
2022-11-10 09:05:25 +00:00
2023-01-03 10:07:43 +00:00
2021-09-08 07:24:12 -07:00
2021-05-01 22:29:02 -04:00
2021-05-02 12:53:49 -04:00
2021-05-01 22:29:03 -04:00
2021-04-27 09:21:33 -04:00
2018-10-29 10:01:44 +01:00
2021-04-29 09:27:19 -04:00
2018-10-29 10:01:44 +01:00
2021-04-29 20:42:16 -04:00
2019-03-26 19:55:33 +01:00
2021-04-27 09:21:34 -04:00
2023-01-03 10:07:43 +00:00
2023-02-22 00:07:26 +08:00
2023-01-03 10:07:43 +00:00
2022-11-10 09:05:25 +00:00
2023-02-22 00:07:26 +08:00