diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-07-25 13:15:04 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2014-07-25 13:15:04 +0200 |
commit | 769967e166088f76efab91e4a0b84e6d3885182d (patch) | |
tree | adc942fb1eae1967b32621aa4b9a50ed9c90b399 /tex/context/base/l-dir.lua | |
parent | a8d691a06b3cb155f33b01d30c38dfed65cab28d (diff) | |
download | context-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.lua | 9 |
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) |