mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fix: segfault in recover_names(): must not concat full path
- regression by 42f1bd9b22
- closes #1836
This commit is contained in:
parent
b23e444b37
commit
813690bb68
@ -1341,9 +1341,10 @@ recover_names (
|
|||||||
if (after_pathsep(dir_name, p) && p[-1] == p[-2]) {
|
if (after_pathsep(dir_name, p) && p[-1] == p[-2]) {
|
||||||
/* Ends with '//', Use Full path for swap name */
|
/* Ends with '//', Use Full path for swap name */
|
||||||
tail = make_percent_swname(dir_name, fname_res);
|
tail = make_percent_swname(dir_name, fname_res);
|
||||||
} else
|
} else {
|
||||||
tail = path_tail(fname_res);
|
tail = path_tail(fname_res);
|
||||||
tail = concat_fnames(dir_name, tail, TRUE);
|
tail = concat_fnames(dir_name, tail, TRUE);
|
||||||
|
}
|
||||||
num_names = recov_file_names(names, tail, FALSE);
|
num_names = recov_file_names(names, tail, FALSE);
|
||||||
free(tail);
|
free(tail);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user