fzf.vim icon indicating copy to clipboard operation
fzf.vim copied to clipboard

E482: Can't open tmp file for writing: no such file or directory, solution proposed.

Open mangelozzi opened this issue 5 years ago • 2 comments

  • [x] I have read through https://github.com/junegunn/fzf.vim/blob/master/README.md
  • [x] I have read through https://github.com/junegunn/fzf/blob/master/README-VIM.md
  • [x] I have read through the manual page of fzf (man fzf)
  • [x] I have searched through the existing issues

Everytime I put my laptop to sleep, then wake up, FZF wont work cause its expecting TMP files which arent there anymore. If one closes Neovim, and restart Neovim, then it works (sometimes this involves closing many working buffers).

This is a sample error message:

Error detected while processing function fzf#vim#buffers[3]..<SNR>99_fzf[18]..fzf#run:
line   27:
E482: Can't open file C:\Users\Michael\AppData\Local\Temp\nvimwTDIgy\7 for writing: no such file or directory

@junegunn , in this closed issue you mentioned :

I don't think there's something we can do about it.

But I propose when FZF tries to access a tmp file, if the tmp file, or dir the tmp file is in does not exist, then to create a new one instead of causing an error.

mangelozzi avatar Apr 25 '20 20:04 mangelozzi

I have the same prob. Every time I end/start mac sessions I see this issue (but it only happens after some time, like next day when I fresh start working, if I put it sleep and come back after some minutes it works fine. I guess is something in Monterey that makes the directory disappear after some time)

E482: Can't open file /var/folders/4w/tf81lkhx55b_t4v20bkbk47h0000gr/T/nvimwKZ0Nu/59 for writing: no such file or directory                         │  101         car.AvailableSeats += journey.Passengers
Error detected while processing function go#decls#Decls:

And only solution is to restart vim. Btw it only happened to me after upgrading to MAC OS Monterey, not sure if that makes the var/folders to restart after ending session.

I'm using NVIM v0.8.0. Is there any solution?

palcalde avatar May 10 '22 07:05 palcalde

I also hit this very frequently after a session for several days

brianc118 avatar May 22 '23 14:05 brianc118