lua-users home
lua-l archive

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

On Thu, Jul 16, 2009 at 2:03 AM, Antoine
Bruguier<> wrote:
> A workaround would be to get the current's file path and concatenate the strings, but I haven't found a way to do that either.

Given the file "Lua\libs\dir.lua":

local path = debug.getinfo(1,"S").source:match("@(.*"..package.config:sub(1,1)..")")

Then the following:

Lua 5.1.4  Copyright (C) 1994-2008, PUC-Rio
> dofile [[Lua\libs\dir.lua]]
> require "Lua.libs.dir"