mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 05:28:33 +00:00
vim-patch:8.2.3543: swapname has double slash when 'directory' ends in it
Problem: Swapname has double slash when 'directory' ends in double slash.
(Shane Smith)
Solution: Remove the superfluous slash. (closes vim/vim#8876)
8b0e62c93b
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -822,9 +822,6 @@ static int buf_write_make_backup(char *fname, bool append, FileInfo *file_info_o
|
||||
size_t dir_len = copy_option_part(&dirp, IObuff, IOSIZE, ",");
|
||||
char *p = IObuff + dir_len;
|
||||
bool trailing_pathseps = after_pathsep(IObuff, p) && p[-1] == p[-2];
|
||||
if (trailing_pathseps) {
|
||||
IObuff[dir_len - 2] = NUL;
|
||||
}
|
||||
if (*dirp == NUL && !os_isdir(IObuff)) {
|
||||
int ret;
|
||||
char *failed_dir;
|
||||
@@ -964,9 +961,6 @@ nobackup:
|
||||
size_t dir_len = copy_option_part(&dirp, IObuff, IOSIZE, ",");
|
||||
char *p = IObuff + dir_len;
|
||||
bool trailing_pathseps = after_pathsep(IObuff, p) && p[-1] == p[-2];
|
||||
if (trailing_pathseps) {
|
||||
IObuff[dir_len - 2] = NUL;
|
||||
}
|
||||
if (*dirp == NUL && !os_isdir(IObuff)) {
|
||||
int ret;
|
||||
char *failed_dir;
|
||||
|
Reference in New Issue
Block a user