From a46502a160ca4a2a9094c9d9ae2b2d49b71a471b Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 6 Apr 2014 19:42:42 -0400 Subject: Added `lfs.abspath()` in order to always use absolute paths. Thanks to Pedro Andres Aranda Gutierrez. --- core/args.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'core/args.lua') diff --git a/core/args.lua b/core/args.lua index 108820eb..6fd18841 100644 --- a/core/args.lua +++ b/core/args.lua @@ -57,12 +57,7 @@ function M.process(arg) f(table.unpack(args)) i = i + n else - if not arg[i]:find(not WIN32 and '^/' or '^%a:[/\\]') then - -- Convert relative path to absolute path. - local cwd = arg[-1] or lfs.currentdir() - arg[i] = cwd..(not WIN32 and '/' or '\\')..arg[i] - end - io.open_file(arg[i]) + io.open_file(lfs.abspath(arg[i])) no_args = false end i = i + 1 -- cgit v1.2.3