Skip to content

Commit

Permalink
reformatted wrongly indented function
Browse files Browse the repository at this point in the history
  • Loading branch information
michal-h21 committed Jun 7, 2024
1 parent efab9b2 commit c4eb94e
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions mkutils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -207,18 +207,18 @@ function find_directories(dirs, pos)
path = table.concat(dirs,"/", 1,pos) .. "/"
end
if not lfs.chdir(path) then -- recursion until we succesfully changed dir
-- or there are no elements in the dir table
return find_directories(dirs,pos - 1)
elseif pos ~= #dirs then -- if we succesfully changed dir
-- and we have dirs to create
local p = {}
for i = pos+1, #dirs do
table.insert(p, dirs[i])
end
return p
else -- whole path exists
return {}
end
-- or there are no elements in the dir table
return find_directories(dirs,pos - 1)
elseif pos ~= #dirs then -- if we succesfully changed dir
-- and we have dirs to create
local p = {}
for i = pos+1, #dirs do
table.insert(p, dirs[i])
end
return p
else -- whole path exists
return {}
end
end

function mkdirectories(dirs)
Expand Down

0 comments on commit c4eb94e

Please sign in to comment.