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
13 | 13 | local append = table.insert |
14 | 14 | local lexer = require 'ldoc.lexer' |
15 | 15 | local quit = utils.quit |
16 | local lfs = require 'lfs' | |
17 | 16 | |
18 | 17 | -- at rendering time, can access the ldoc table from any module item, |
19 | 18 | -- or the item itself if it's a module |
224 | 223 | |
225 | 224 | function M.check_directory(d) |
226 | 225 | 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 | |
228 | 229 | end |
229 | 230 | end |
230 | 231 |