30 Jan
2013
30 Jan
'13
3 p.m.
Hello! The file tex/context/base/l-file.lua has a small bug in function remove suffix. The problem is that strings like path/./to/file become path/ Here is a fix: diff --git a/tex/context/base/l-file.lua b/tex/context/base/l-file.lua index e91eeac..bb63359 100644 --- a/tex/context/base/l-file.lua +++ b/tex/context/base/l-file.lua @@ -166,7 +166,7 @@ end -- inspect(file.nametotable("dir/file.ext")) -- inspect(file.nametotable("/dir/file.ext")) -local pattern = Cs(((period * noperiod^1 * -1)/"" + 1)^1) +local pattern = Cs(((period * (1-period-slashes)^1 * -1)/"" + 1)^1) function file.removesuffix(name) return name and lpegmatch(pattern,name)