summaryrefslogtreecommitdiff
path: root/lualibs-dir.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2016-10-20 07:28:32 +0200
committerPhilipp Gesang <phg@phi-gamma.net>2016-10-20 07:28:32 +0200
commit12d27922f7bb7f466b5d476fa2c1ddc08a300513 (patch)
treecf8576b89e743d1684e8409441c9c0e84d199118 /lualibs-dir.lua
parent349d46eb1e7f1d13f5d823e818216b5ef1cee566 (diff)
downloadlualibs-12d27922f7bb7f466b5d476fa2c1ddc08a300513.tar.gz
sync with Context as of 2016-10-20
Signed-off-by: Philipp Gesang <phg@phi-gamma.net>
Diffstat (limited to 'lualibs-dir.lua')
-rw-r--r--lualibs-dir.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/lualibs-dir.lua b/lualibs-dir.lua
index db4125c..bc691d5 100644
--- a/lualibs-dir.lua
+++ b/lualibs-dir.lua
@@ -587,9 +587,13 @@ file.expandname = dir.expandname -- for convenience
local stack = { }
function dir.push(newdir)
- insert(stack,currentdir())
+ local curdir = currentdir()
+ insert(stack,curdir)
if newdir and newdir ~= "" then
chdir(newdir)
+ return newdir
+ else
+ return curdir
end
end