From ab900a487ec1784bc479343869a6674ea866106e Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 13 Mar 2012 21:04:24 -0400 Subject: Use absolute paths for command line files; core/args.lua --- core/args.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/args.lua') diff --git a/core/args.lua b/core/args.lua index 8e76b395..08b74ffd 100644 --- a/core/args.lua +++ b/core/args.lua @@ -52,6 +52,10 @@ function M.process() f(table.unpack(args)) i = i + n else + if not arg[i]:find(not WIN32 and '^/' or '^%u:[/\\]') then + -- Convert relative path to absolute path. + arg[i] = lfs.currentdir()..(not WIN32 and '/' or '\\')..arg[i] + end io.open_file(arg[i]) no_args = false end -- cgit v1.2.3