diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-07-15 16:51:03 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-07-15 16:51:03 +0800 |
commit | ef1de8728e84386ae17fbeb64500f658bb98ca8d (patch) | |
tree | 1ebedc32f62094e679cbb29e1a22e11ed1beb7b7 /script | |
parent | 77ba895e1eb5e61acbce33e355396b947a764bca (diff) | |
download | lua-language-server-ef1de8728e84386ae17fbeb64500f658bb98ca8d.zip |
check exists before creating directories
Diffstat (limited to 'script')
-rw-r--r-- | script/library.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/script/library.lua b/script/library.lua index 80a34032..0ec6c954 100644 --- a/script/library.lua +++ b/script/library.lua @@ -218,7 +218,9 @@ local function initBuiltIn() end m.metaPath = metaPath:string() m.metaPaths = {} - fs.create_directories(metaPath) + if not fs.exists(metaPath) then + fs.create_directories(metaPath) + end local out = fsu.dummyFS() local templateDir = ROOT / 'meta' / 'template' for libName, status in pairs(define.BuiltIn) do |