[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: PenLight dir.makepath() not working
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 18 Jan 2010 18:46:45 +0200
On Mon, Jan 18, 2010 at 6:12 PM, RJP Computing <rjpcomputing@gmail.com> wrote:
> Any update on this? Just kind of getting close to needing this
> functionality.
Weirdly broken, this one. This seems to do the job:
function _makepath(p)
if not path.isdir(p) then
local subp = p:match(dirpat)
if not _makepath(subp) then return false end
return lfs.mkdir(p)
else
return true
end
end
function makepath (p)
return _makepath(path.normcase(path.abspath(p)))
end
That is, it's necesary to start with the full path, and work with
that. Tested on Windoze, should work on the other side!
steve d.