mirror of
https://github.com/neovim/neovim.git
synced 2026-07-13 21:00:42 +00:00
fix: dont create data dir if it's a broken symlink
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
(cherry picked from commit a6051e68a3)
This commit is contained in:
committed by
github-actions[bot]
parent
57f1bc34fc
commit
8a85eb7a21
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user