1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-14 15:19:12 +08:00

Fix: can't found file, just cant found directory (#1883)

This commit is contained in:
s97712 2018-06-27 20:31:51 +08:00 committed by Wang Shidong
parent d56f88a3df
commit adfffa4489

View File

@ -126,7 +126,8 @@ function! s:find_root_directory() abort
else
let dir = SpaceVim#util#findFileInParent(pattern, fd)
endif
if !empty(dir) && isdirectory(dir)
let ftype = getftype(dir)
if ftype == "dir" || ftype == "file"
let dir = fnamemodify(dir, ':p')
call SpaceVim#logger#info("Find project root('" . pattern . "','" . fd . "'):" . dir)
call add(dirs, dir)