1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 11:10:04 +08:00

fix(mkdir): fix mkdir lua plugin

This commit is contained in:
Eric Wong 2024-06-03 22:38:36 +08:00
parent e5f8d2b012
commit a10d464ca9

View File

@ -19,12 +19,11 @@ local function mkdir(dir)
end
local function create_directory(dir)
local d = dir
if d ~= '^[a-z]\\+:/' then
if vim.regex('^[a-z]\\+:/'):match_str(dir) then
return
end
if sp.fn.isdirectory(d) == 0 then
mkdir(d)
if sp.fn.isdirectory(dir) == 0 then
mkdir(dir)
end
end