diff options
| author | Philipp Gesang <phg42.2a@gmail.com> | 2014-03-16 16:11:34 +0100 | 
|---|---|---|
| committer | Philipp Gesang <phg42.2a@gmail.com> | 2014-03-16 16:11:34 +0100 | 
| commit | f8fa3ab7afa4746d534a8d660b7d6bf9d28a0e9c (patch) | |
| tree | 4fb31c6dd459a3717c60e445bedb1e82d4560c70 /lualibs-dir.lua | |
| parent | 5ed9c2a6d45121bdeacdf1c8f4dead50374f0899 (diff) | |
| download | lualibs-f8fa3ab7afa4746d534a8d660b7d6bf9d28a0e9c.tar.gz | |
sync with Context as of 2014-03-16
Diffstat (limited to 'lualibs-dir.lua')
| -rw-r--r-- | lualibs-dir.lua | 7 | 
1 files changed, 3 insertions, 4 deletions
diff --git a/lualibs-dir.lua b/lualibs-dir.lua index b658b7c..2572120 100644 --- a/lualibs-dir.lua +++ b/lualibs-dir.lua @@ -27,7 +27,7 @@ local currentdir = lfs.currentdir  local chdir      = lfs.chdir  local mkdir      = lfs.mkdir -local onwindows  = os.type == "windows" or find(os.getenv("PATH"),";") +local onwindows  = os.type == "windows" or find(os.getenv("PATH"),";",1,true)  -- in case we load outside luatex @@ -189,7 +189,7 @@ local function glob(str,t)              local split = lpegmatch(pattern,str) -- we could use the file splitter              if split then                  local root, path, base = split[1], split[2], split[3] -                local recurse = find(base,"%*%*") +                local recurse = find(base,"**",1,true) -- find(base,"%*%*")                  local start = root .. path                  local result = lpegmatch(filter,start .. base)                  globpattern(start,result,recurse,t) @@ -215,7 +215,7 @@ local function glob(str,t)                  local t = t or { }                  local action = action or function(name) t[#t+1] = name end                  local root, path, base = split[1], split[2], split[3] -                local recurse = find(base,"%*%*") +                local recurse =  find(base,"**",1,true) -- find(base,"%*%*")                  local start = root .. path                  local result = lpegmatch(filter,start .. base)                  globpattern(start,result,recurse,action) @@ -296,7 +296,6 @@ if onwindows then              str = ""              for i=1,n do                  local s = select(i,...) -                local s = select(i,...)                  if s == "" then                      -- skip                  elseif str == "" then  | 
