Skip to content

Commit

Permalink
fix(path) makepath would fail to create a top-level dir
Browse files Browse the repository at this point in the history
In case of "/blaa" the pattern would fail to match
  • Loading branch information
Tieske committed Jan 29, 2021
1 parent 4c7088b commit 48f7560
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/pl/dir.lua
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,10 @@ do
end
if not path.isdir(p) then
local subp = p:match(dirpat)
local ok, err = _makepath(subp)
if not ok then return nil, err end
if subp then
local ok, err = _makepath(subp)
if not ok then return nil, err end
end
return mkdir(p)
else
return true
Expand Down

0 comments on commit 48f7560

Please sign in to comment.