New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complains a lot when tempdir vanishes #190
Comments
|
I can see two possible solutions here. First, do as you suggest and have the plugin catch the "can't open file errors" and recreate the directory itself. Second, set Would you be able to try the second option and see whether it solves the problem for you? |
|
Hmm. It would presumably solve the problem, but then I'd have another temp dir somewhere slowly being filled with things I'd have to remember to delete, which sort of defeats the purpose of a temp dir. Maybe if I added a systemd job to empty it regularly for me... ;) |
|
I see your point ;) I'd still prefer to find a general solution to this rather than add code to this plugin, because it's a general Vim problem. It might be worth your posting a question on vim_use. In the meantime I'll keep digging and see if I can find anything. |
|
Did you make any progress with this? |
|
It would be nice if vim-gitgutter handled this situation but I think really it's vim's responsibility. So I'm going to close this. I'm not averse to including a patch which remedies this if it's simple and small. |
Vim does not check the existence of its temp directory when generating file names with tempname(). Therefore if, for some reason, the temp directory gets deleted, Vim will continue to generate paths for file names inside the directory. Writes to these file paths will fail (E482). See #746, #433, #190, #147.
eevee commentedAug 20, 2014
I'm on Arch and subject to the whims of systemd, which apparently include deleting anything older than ten days from
/tmpwhenever it feels like it.If this happens, any vim process I've left idle for more than ten days will start spewing "Can't open file" errors, because the underlying tempdir no longer exists. Nothing important must be there, because recreating the directory manually makes everything work merrily again.
I could turn this behavior off, but given that
/tmpis intended to be volatile, perhaps gitgutter should notice when its tempdir falls out from under it, and quietly recreate it?The text was updated successfully, but these errors were encountered: