Codebase list lua-ldoc / 3e573f4
Merge pull request #244 from mpeterv/make-target-dir Use dir.makepath when creating output directory Steve J Donovan authored 7 years ago GitHub committed 7 years ago
1 changed file(s) with 3 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
1313 local append = table.insert
1414 local lexer = require 'ldoc.lexer'
1515 local quit = utils.quit
16 local lfs = require 'lfs'
1716
1817 -- at rendering time, can access the ldoc table from any module item,
1918 -- or the item itself if it's a module
224223
225224 function M.check_directory(d)
226225 if not path.isdir(d) then
227 lfs.mkdir(d)
226 if not dir.makepath(d) then
227 quit("Could not create "..d.." directory")
228 end
228229 end
229230 end
230231