From 3cc95933d9267fdb3eb4e0b31034d49c34427446 Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 21 Dec 2018 11:38:58 +0800 Subject: =?UTF-8?q?*=E6=B8=B8=E6=88=8F=E6=A0=B9=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin-lua/embed/scripts/path/path.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/libjin-lua/embed/scripts/path/path.lua') diff --git a/src/libjin-lua/embed/scripts/path/path.lua b/src/libjin-lua/embed/scripts/path/path.lua index 5ecc05c..d41c167 100644 --- a/src/libjin-lua/embed/scripts/path/path.lua +++ b/src/libjin-lua/embed/scripts/path/path.lua @@ -2,11 +2,10 @@ jin.path = jin.path or {} local jp = jin.path --- Game root directory -jin._root = nil +-- Game root directory. +jin.cwd = jin.args['cwd'] or '.' --- Get full path of a given path +-- Get full path of a given path. function jin.path.full(path) - local root = jin._dir .. '/' .. jin._argv[2] - return root .. '/' .. path + return jin.cwd .. '/' .. path end -- cgit v1.1-26-g67d0