mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 23:48:32 +00:00
shada: Fix non-writeable ShaDa directory handling
Before this change, nvim -i /etc/shada segfaults on exit if the file does not exist and user does not have permissions to create the file at /etc/shada. Closes #5296 Reported in #5277 https://github.com/neovim/neovim/issues/5277#issuecomment-243937255
This commit is contained in:
@@ -2976,7 +2976,7 @@ shada_write_file_nomerge: {}
|
||||
if (sd_writer.cookie == NULL) {
|
||||
xfree(fname);
|
||||
xfree(tempname);
|
||||
if (sd_reader.close != NULL) {
|
||||
if (sd_reader.cookie != NULL) {
|
||||
sd_reader.close(&sd_reader);
|
||||
}
|
||||
return FAIL;
|
||||
|
Reference in New Issue
Block a user