mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #16221 from glacambre/fix_13187
fix: remove double slash in sysinit path
This commit is contained in:
commit
f26b391317
@ -1697,8 +1697,11 @@ static void do_system_initialization(void)
|
||||
}
|
||||
char *vimrc = xmalloc(dir_len + sizeof(path_tail) + 1);
|
||||
memcpy(vimrc, dir, dir_len);
|
||||
vimrc[dir_len] = PATHSEP;
|
||||
memcpy(vimrc + dir_len + 1, path_tail, sizeof(path_tail));
|
||||
if (vimrc[dir_len - 1] != PATHSEP) {
|
||||
vimrc[dir_len] = PATHSEP;
|
||||
dir_len += 1;
|
||||
}
|
||||
memcpy(vimrc + dir_len, path_tail, sizeof(path_tail));
|
||||
if (do_source(vimrc, false, DOSO_NONE) != FAIL) {
|
||||
xfree(vimrc);
|
||||
xfree(config_dirs);
|
||||
|
Loading…
Reference in New Issue
Block a user