diff options
author | mitchell <70453897+667e-11@users.noreply.github.com> | 2014-04-06 19:42:42 -0400 |
---|---|---|
committer | mitchell <70453897+667e-11@users.noreply.github.com> | 2014-04-06 19:42:42 -0400 |
commit | a46502a160ca4a2a9094c9d9ae2b2d49b71a471b (patch) | |
tree | e9bb8efb5d86632cf297e77456bc738f5136e2a1 /core/args.lua | |
parent | eff5df2952e26b5a1a25e95befe485068df10c81 (diff) |
Added `lfs.abspath()` in order to always use absolute paths.
Thanks to Pedro Andres Aranda Gutierrez.
Diffstat (limited to 'core/args.lua')
-rw-r--r-- | core/args.lua | 7 |
1 files changed, 1 insertions, 6 deletions
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 |