From 552aceb88e5e5e77a9263144180139a6ac95646c Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 25 Jul 2014 12:57:00 +0200 Subject: beta 2014.07.25 12:57 --- tex/context/base/l-dir.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tex/context/base/l-dir.lua') diff --git a/tex/context/base/l-dir.lua b/tex/context/base/l-dir.lua index 660529baf..bcf28d011 100644 --- a/tex/context/base/l-dir.lua +++ b/tex/context/base/l-dir.lua @@ -36,9 +36,14 @@ if onwindows then -- lfs.isdir does not like trailing / -- lfs.dir accepts trailing / + local tricky = S("/\\") * P(-1) + isdir = function(name) - name = gsub(name,"([/\\]+)$","/.") - return attributes(name,"mode") == "directory" + if lpegmatch(tricky,name) then + return attributes(name,"mode") == "directory" + else + return attributes(name.."/.","mode") == "directory" + end end isfile = function(name) -- cgit v1.2.3