lua-users home
lua-l archive

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


I ended up providing an API (callable from Lua) that gave the current
directory, as well as the directory the script ran from (not
necessarily the same thing).

Is this available?  I still haven't figured out how to do this as
argv[0] isn't entirely reliable.  At least on OSX, if you launch an
app from the Finder, argv[0] does provide the proper path, but if you
launch from the command line, it doesn't.  This is really annoying.  I
need something more robust than this.  I haven't found any C functions
for figuring out where the app is located yet.  Does anyone know of
any?

thanks,
wes