summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-15 16:51:03 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-15 16:51:03 +0800
commitef1de8728e84386ae17fbeb64500f658bb98ca8d (patch)
tree1ebedc32f62094e679cbb29e1a22e11ed1beb7b7
parent77ba895e1eb5e61acbce33e355396b947a764bca (diff)
downloadlua-language-server-ef1de8728e84386ae17fbeb64500f658bb98ca8d.zip
check exists before creating directories
-rw-r--r--script/library.lua4
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