diff options
Diffstat (limited to 'src/libjin-lua/embed/scripts/path/path.lua')
-rw-r--r-- | src/libjin-lua/embed/scripts/path/path.lua | 9 |
1 files changed, 4 insertions, 5 deletions
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 |