summaryrefslogtreecommitdiff
path: root/tex/context/base/l-dir.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2014-07-25 13:15:04 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2014-07-25 13:15:04 +0200
commit769967e166088f76efab91e4a0b84e6d3885182d (patch)
treeadc942fb1eae1967b32621aa4b9a50ed9c90b399 /tex/context/base/l-dir.lua
parenta8d691a06b3cb155f33b01d30c38dfed65cab28d (diff)
downloadcontext-769967e166088f76efab91e4a0b84e6d3885182d.tar.gz
2014-07-25 12:59:00
Diffstat (limited to 'tex/context/base/l-dir.lua')
-rw-r--r--tex/context/base/l-dir.lua9
1 files changed, 7 insertions, 2 deletions
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)