lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Do you plan to release Penlight soon?
--
Regards,
Ryan

On Jan 18, 2010 11:47 AM, "steve donovan" <steve.j.donovan@gmail.com> wrote:

On Mon, Jan 18, 2010 at 6:12 PM, RJP Computing <rjpcomputing@gmail.com> wrote: > Any update on this?...

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.