summaryrefslogtreecommitdiff
path: root/scripts/context/lua/mtxrun.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/context/lua/mtxrun.lua')
-rw-r--r--scripts/context/lua/mtxrun.lua13
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 114d2ef0c..7a721829e 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -1185,10 +1185,11 @@ function table.unique(old)
return new
end
--- function table.sorted(t,...)
--- table.sort(t,...)
--- return t -- still sorts in-place
--- end
+function table.sorted(t,...)
+ sort(t,...)
+ return t -- still sorts in-place
+end
+
end -- of closure
@@ -15009,6 +15010,10 @@ prefixes.home = function(str)
end
local function toppath()
+ local inputstack = resolvers.inputstack -- dependency, actually the code should move but it's
+ if not inputstack then -- more convenient to keep it here
+ return "."
+ end
local pathname = dirname(inputstack[#inputstack] or "")
if pathname == "" then
return "."