neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit adb2258345409d08c42809da0212eeb792e70106
parent c9f53d0e40815644bbf7c57a0792f2c793c954aa
Author: Samuel (ThinLinc team) <samuel@cendio.se>
Date:   Tue, 28 Nov 2023 12:17:39 +0100

fix(rplugin): dont create data dir if it's a broken symlink #25726

Checking if it's non-empty and not a directory gets us quite far, but
not all the way. While a working symlink would trigger the earlier
checks, a broken symlink does not.

This commit fixes the special case where ~/.local/share/nvim  already
exists but is a broken symlink. Thus, it fixes the following error on
startup:

E739: Cannot create directory /home/samuel/.local/share/nvim: file
already exists
Diffstat:
Mruntime/plugin/rplugin.vim | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/runtime/plugin/rplugin.vim b/runtime/plugin/rplugin.vim @@ -14,7 +14,9 @@ function! s:GetManifestPath() abort let dest = stdpath('data') if !empty(dest) if !isdirectory(dest) - call mkdir(dest, 'p', 0700) + if getftype(dest) != "link" + call mkdir(dest, 'p', 0700) + endif endif let manifest_base = dest endif