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.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 8ee32ca2d..dd2ba551f 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -3239,13 +3239,13 @@ local function collectpattern(path,patt,recurse,result)
local ok, scanner
result = result or { }
if path == "/" then
- ok, scanner = xpcall(function() return walkdir(path..".") end, function() end) -- kepler safe
+ ok, scanner, first = xpcall(function() return walkdir(path..".") end, function() end) -- kepler safe
else
- ok, scanner = xpcall(function() return walkdir(path) end, function() end) -- kepler safe
+ ok, scanner, first = xpcall(function() return walkdir(path) end, function() end) -- kepler safe
end
if ok and type(scanner) == "function" then
if not find(path,"/$") then path = path .. '/' end
- for name in scanner do
+ for name in scanner, first do
local full = path .. name
local attr = attributes(full)
local mode = attr.mode