mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 12:50:04 +08:00
Fix cache directory (#4414)
This commit is contained in:
parent
33fd230c4b
commit
8f76047cbd
@ -195,6 +195,10 @@ function! SpaceVim#custom#load() abort
|
||||
call SpaceVim#custom#apply(conf, 'local')
|
||||
else
|
||||
let conf = s:TOML.parse_file(local_conf)
|
||||
let dir = s:FILE.unify_path(expand(g:spacevim_data_dir . 'SpaceVim/conf/'))
|
||||
if !isdirectory(dir)
|
||||
call mkdir(dir, 'p')
|
||||
endif
|
||||
call SpaceVim#logger#info('generate local conf: ' . local_conf_cache)
|
||||
call writefile([s:JSON.json_encode(conf)], local_conf_cache)
|
||||
call SpaceVim#custom#apply(conf, 'local')
|
||||
@ -239,6 +243,10 @@ function! s:load_glob_conf() abort
|
||||
let conf = s:JSON.json_decode(join(readfile(local_conf_cache, ''), ''))
|
||||
call SpaceVim#custom#apply(conf, 'glob')
|
||||
else
|
||||
let dir = s:FILE.unify_path(expand(g:spacevim_data_dir . 'SpaceVim/conf/'))
|
||||
if !isdirectory(dir)
|
||||
call mkdir(dir, 'p')
|
||||
endif
|
||||
let conf = s:TOML.parse_file(local_conf)
|
||||
call writefile([s:JSON.json_encode(conf)], local_conf_cache)
|
||||
call SpaceVim#custom#apply(conf, 'glob')
|
||||
|
Loading…
Reference in New Issue
Block a user